Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How do I advance the range by one row Excell VBA automatically
I am using
Sheets(Array("Breakfast", "Lunch", "Supper", "Bedtime")).Select Range("B94:D98").Select but when I run this more than once it overwrites what was put in the first time. |
#2
|
|||
|
|||
dim rng1 as range
dim rng2 as range set rng1 = range("B94:D98") do while something 'or do until something set rng2 = rng1.offset(1,0)'rng2 is 1 row down from rng1 Sheets(Array ("Breakfast", "Lunch", "Supper", "Bedtime")).Select 'more code?? set rng1 = rng2 'move down 1 row. resets at loop start. loop this do loop will move you down the sheet 1 row at a time each loop. you will have to have find a way out of the loop or it will go down to row 65536 and crash on you. -----Original Message----- I am using Sheets(Array ("Breakfast", "Lunch", "Supper", "Bedtime")).Select Range("B94:D98").Select but when I run this more than once it overwrites what was put in the first time. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
range names | Excel Worksheet Functions | |||
named range refers to: in a chart | Excel Discussion (Misc queries) | |||
range names | Excel Worksheet Functions | |||
range names | Excel Worksheet Functions | |||
range name | Excel Worksheet Functions |