Column Q contains numbers, and string"Group By". Column R contains both Names (against the cells containing string), and part numbers in other rows. I want to copy only the names from column R, if column Q is value= "Group By". I have written the following code.
Do While ActiveCell.Value <> ""
For i = Q2 To Q1000
If ActiveCell.Value = "Group By" Then
ActiveCell.Offset(0, -1).PasteSpecial Paste:=xlValue
It copies only the first row value, and then the selection is not moving down in column Q. Can anyone please help me to rectify the error?
Thanks a lot