amandabstewart
New Member
- Joined
- Aug 4, 2014
- Messages
- 45
I've been trying (for HOURS) to achieve the following goal:
Need to take the first three cells of rows and copy them to a different worksheet when the word "Alex" appears in column B.
I've tried editing the following macro that copies the whole row but nothing I change the entire row.copy command to works
I'm trying to copy Alex's work info from my Work Log worksheet to his individual worksheet without writing over the contents to the right of where the copied cells will go.
If I can get this to work, I had hoped I could expand the macro to do the same for other names as well (eg copy Timmy's work to his worksheet, etc.)
Sub MoveWork()
Dim x As Long, y As Long
y = 1
Application.ScreenUpdating = False
For x = 1 To Worksheets("Work Log").Range("B65536").End(xlUp).Row
If InStr(1, Worksheets("Work Log").Range("B" & x), "Alex") > 0 Then
Worksheets("Work Log").Range("B" & x).EntireRow.Copy
Worksheets("Alex").Range("A" & y).PasteSpecial
Application.CutCopyMode = False
y = y + 1
End If
Next x
Application.ScreenUpdating = True
End Sub
Need to take the first three cells of rows and copy them to a different worksheet when the word "Alex" appears in column B.
I've tried editing the following macro that copies the whole row but nothing I change the entire row.copy command to works

I'm trying to copy Alex's work info from my Work Log worksheet to his individual worksheet without writing over the contents to the right of where the copied cells will go.
If I can get this to work, I had hoped I could expand the macro to do the same for other names as well (eg copy Timmy's work to his worksheet, etc.)
Sub MoveWork()
Dim x As Long, y As Long
y = 1
Application.ScreenUpdating = False
For x = 1 To Worksheets("Work Log").Range("B65536").End(xlUp).Row
If InStr(1, Worksheets("Work Log").Range("B" & x), "Alex") > 0 Then
Worksheets("Work Log").Range("B" & x).EntireRow.Copy
Worksheets("Alex").Range("A" & y).PasteSpecial
Application.CutCopyMode = False
y = y + 1
End If
Next x
Application.ScreenUpdating = True
End Sub