Would like assistance on the following routine.
Want to start with selecting B20 (data is updated in the sheet when a cell in column B is selected), copy the updated data in K15:S15, and paste into the end of row 20, which will be column AA for this sheet, then repeat selecting the next cell in column B until there is no data left in B. So the loop would go to B21, copy, then paste, then B22 and so forth until no data left in B.
My code below works but need to make a loop until no data left to select in column B:
Sub SelectMNPasteValues()
'
' SelectMNPasteValues Macro
'
'
Range("B20").Select
Range("K15:S15").Select
Application.CutCopyMode = False
Selection.Copy
Range("AA20").Select
Selection.PasteSpecial Paste:=xlPasteAllUsingSourceTheme, Operation:=xlNone _
, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Want to start with selecting B20 (data is updated in the sheet when a cell in column B is selected), copy the updated data in K15:S15, and paste into the end of row 20, which will be column AA for this sheet, then repeat selecting the next cell in column B until there is no data left in B. So the loop would go to B21, copy, then paste, then B22 and so forth until no data left in B.
My code below works but need to make a loop until no data left to select in column B:
Sub SelectMNPasteValues()
'
' SelectMNPasteValues Macro
'
'
Range("B20").Select
Range("K15:S15").Select
Application.CutCopyMode = False
Selection.Copy
Range("AA20").Select
Selection.PasteSpecial Paste:=xlPasteAllUsingSourceTheme, Operation:=xlNone _
, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub