Good afternoon,
I have built some code that I have applied to a command button, which copies and pastes data from one sheet to the next, but only If cell c7 is populated.
I am struggling to work out how to loop this code to the next row, and the next row and the next etc.
I only want to loop it from A7:M7 to A25:M25
Currently I have the below code and I have replicated it for each row that I want to apply it to, which looks quite messy, so I wanted to try and tidy it up a bit.
Any ideas?
Thanks
I have built some code that I have applied to a command button, which copies and pastes data from one sheet to the next, but only If cell c7 is populated.
I am struggling to work out how to loop this code to the next row, and the next row and the next etc.
I only want to loop it from A7:M7 to A25:M25
Currently I have the below code and I have replicated it for each row that I want to apply it to, which looks quite messy, so I wanted to try and tidy it up a bit.
Any ideas?
Thanks

Code:
Public Sub Copy_Dailys()
'
'' CopyDailys Macro
'Turns off screen updating
Application.ScreenUpdating = False
If ThisWorkbook.Sheets("Input").Range("C7").Text <> "" Then
Sheets("Input").Select
Range("A7,C7,E7,G7,I7,K7,M7").Select
Range("M7").Activate
Selection.Copy
Sheets("Output").Select
Range("A2").Select
Range("A" & Rows.Count).End(xlUp).Offset(1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Input").Select
Range("A10").Select
Application.CutCopyMode = False
Range("A35").Select
End If