Hi All,
Another beginner question, I have a list of tasks (column A) and resources (row 1) with hours for each in a grid pattern. I need to run a macro that looks through the grid and finds the hours greater than 0 and then returns the task name and resource name into a new table (from row 7 downwards with tasks in column 1 and resources in column 2). I am using "END" as a stopping point after the very last entry in the grid (cell D5). I've played around with a few different attempts at this, but always getting an error, can someone please help with the code below and see where it is going wrong? I would greatly appreciate any help!
Sub GenerateList()
Dim i As Integer
Dim j As Integer
Dim k As Integer
i = 2
j = 2
k = 7
Do While Cells(i, 5).Value <> "END"
If Cells(i, j).Value > 0 Then
Cells(k, 1).Value = Cells(i, 1)
Cells(k, 2).Value = Cells(1, j)
k = k + 1
j = j + 1
Else
j = 2
i = i + 1
End If
Loop
i = i + 1
j = 2
End Sub
Bookmarks