Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
[Excel 2002]
I'm a raw beginner w/ VBA, as evidenced by the simple problem I'm stumped by... All I'm trying to do is, starting w/ a clean worksheet, write a sub to apply the value "55" to ranges beginning w/ "A1:D3", then skipping rows 4 thru 6, then entering value in range "A7:D9", etc., and setting a stop point around row 36. So basically, I'm trying to write a simple loop to apply formatting to alternating bands/ranges, and am using the value "55" as a placeholder. Here's what I'm trying to make work: Sub PracticeBanding() Dim MyRange As Object Set MyRange = Range("A1:D3").Select Do Until ActiveCell.Row 36 = True MyRange.Value = 55 MyRange.Offset(6, 0).Select Loop End Sub So what happens is, As I step through the procedure, it selects the first range, applies the correct value, offsets down to the next range just fine...and then fails to apply the values, and just loops back up to original range and back down to empty range over and over....it doesn't apply the values after the first range.... I know this is basic as gravity, but I'd sure appreciate someone helping me with it! Thanks much for your time [:-) terry b. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
simple loop needed please | Excel Discussion (Misc queries) | |||
I need a simple loop with a 4+ row added in. | Excel Discussion (Misc queries) | |||
simple loop macro | Excel Programming | |||
simple loop macro | Excel Programming | |||
simple loop macro | Excel Programming |