Hi Gang,
I'm a complete beginner to VBA loops. I've got an idea that I want to try out, but i'm unsure as to how to do it.
OK. I have the following code that selects a number of cells, then performs a paste-special command into a different sheet.
I need a loop that adds 1 to the first selected range (i.e. Range("A1:H1") becomes Range("A2:H2") and so on...) but also adds 8 to the second selected range (i.e. Range("A3") becomes Range("A11") etc etc). It should loop until the first Range ( Sheet1.Range("A1:H1")) reaches a blank cell.![]()
Sub Macro4() ThisWorkbook.Sheets("Sheet1").Select ActiveSheet.Range("A1:H1").Select Selection.Copy ThisWorkbook.Sheets("ADMLOD").Select ActiveSheet.Range("A3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=True End Sub
Does anyone have any ideas about what I can do? As I said, i'm completely new to loops, but very willing to learn
Thanks in advance,
- Jon
Bookmarks