Copying text to different sheets based on criteria

Closed
Ronster444 - Jul 2, 2015 at 09:46 AM
 Ronster444 - Jul 2, 2015 at 10:36 AM
Hello,
I have a large speradsheet that records activity. I want to copy a row of items from one sheet to another if the status is 'done'.

The if status = done " " does not work

can anyone help?


1 response

Giedrius Posts 1 Registration date Thursday July 2, 2015 Status Member Last seen July 2, 2015
Jul 2, 2015 at 09:49 AM
Hello try to make this simple macro:
Sub copyDone()
Set i = Sheets("Sheet1")
Set done = Sheets("done")

Dim d
Dim j
d = 1
j = 2
Do Until IsEmpty(i.Range("B" & j))

If i.Range("B" & j) = "Done" Then
d = d + 1
done.Rows(d).Value = i.Rows(j).Value

End If
j = j + 1
Loop
0
Sorry this does not work. I need the macro to look at 8 sheets of data in the workbook and only copy across those that have a status of "Done".

Any other ideas, although maybe I didn't run the macro properly - have never done that before.
0