negarshaban
New Member
Hi everyone...
I have a calendar and I need to assign tasks on it, but I want them to be repeated from the start date(1/12/2022) to the end date(12/12/2022) of the task.
secondly, I may assign multiple tasks on one cell, I want it to be possible queuing new tasks by char(10).
I have a calendar and I need to assign tasks on it, but I want them to be repeated from the start date(1/12/2022) to the end date(12/12/2022) of the task.
secondly, I may assign multiple tasks on one cell, I want it to be possible queuing new tasks by char(10).
TASKS | START DATE | FINISH DATE |
TASK 1 | 1/12/2022 | 12/12/2022 |
Code:
Private Sub Worksheet_Activate()
On Error Resume Next
Dim sh As Worksheet, wInt As Variant
Dim row1 As Integer, cl1 As Integer
Dim c
For row1 = 5 To 15 Step 2
For cl1 = 2 To 8
wInt = Cells(row1, cl1).Value
For Each c In Sheets("Gantt").Range("C2:C" & Range("C" & Rows.Count).End(xlUp).row)
If c.Value = Cells(row1, cl1).Value Then
Cells(row1, cl1).Offset(1, 0).Value = c.Offset(0, -1)
End If
Next
Next
Next
End Sub