G
Guest
I'm tryingo to write a macro in excel which:
-Finds a word in the file
-Selects the row which contains the word
-Changes the color of the row
-Copy the entire row
I have this:
Cells.FindNext(After:=ActiveCell).Activate
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Selection.Copy
End Sub
but i can't seem to figure out how to select only the row which contains the
word. If I select the entire row, the macro will always copy that same row ['
Rows(4)' will select always row 4. 'Rows' will select all the rows...]
Comments?
-Finds a word in the file
-Selects the row which contains the word
-Changes the color of the row
-Copy the entire row
I have this:
Cells.FindNext(After:=ActiveCell).Activate
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Selection.Copy
End Sub
but i can't seem to figure out how to select only the row which contains the
word. If I select the entire row, the macro will always copy that same row ['
Rows(4)' will select always row 4. 'Rows' will select all the rows...]
Comments?