I'm only just now starting to do Loops (i've so far managed to avoid them). However i now want to create a loop that will loop through a range until it finds a cell that is empty.
For each cell that is not empty I want it to copy and paste to maintain the formulas ine sheet as part of an edit / delete system.
Range would be Range("A5:A200")
the following code is copy and paste for 1 row where the cell shows a number (i'd prefer it to check for any value - but i'll cover that when i have a working loop)
Essentially i want it to loop through the range until the first empty cell but I just can't get my head around it, any help or pointers would be much appreciated as I just can't figure out where to start.
For each cell that is not empty I want it to copy and paste to maintain the formulas ine sheet as part of an edit / delete system.
Range would be Range("A5:A200")
the following code is copy and paste for 1 row where the cell shows a number (i'd prefer it to check for any value - but i'll cover that when i have a working loop)
Code:
range("A5").Select 'starting point
If IsNumeric(Selection.Value) Then
Selection.Offset(-1, 1).Copy
Selection.Offset(0, 1).PasteSpecial
Selection.Offset(-1, 1).Copy
Selection.Offset(0, 1).PasteSpecial
Selection.Offset(-1, 1).Copy
Selection.Offset(0, 1).PasteSpecial
Selection.Offset(-1, 1).Copy
Selection.Offset(0, 1).PasteSpecial
Selection.Offset(-1, 1).Copy
Selection.Offset(0, 1).PasteSpecial
End If
Essentially i want it to loop through the range until the first empty cell but I just can't get my head around it, any help or pointers would be much appreciated as I just can't figure out where to start.