Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
syntax for range selection
Hi folks, I have a range say from A2:B11 on a sheet range ("A2:B11").select with selection I am formating a bunch of things then I like to select an identical range below that range ("A12:B21") What would be the syntax for this increment in range? Then I am going to repeat the formating steps on this range. It would do this untill the end of data. Appreciate your help please. Thanks Syed -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=498394 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
syntax for range selection
Option Explicit
Sub testme02() Dim iRow As Long Dim FirstRow As Long Dim LastRow As Long Dim myStep As Long myStep = 10 With ActiveSheet FirstRow = 2 LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For iRow = FirstRow To LastRow Step myStep With .Cells(iRow, "A").Resize(myStep, 2) 'do your formatting or... MsgBox .Address End With Next iRow End With End Sub saziz wrote: Hi folks, I have a range say from A2:B11 on a sheet range ("A2:B11").select with selection I am formating a bunch of things then I like to select an identical range below that range ("A12:B21") What would be the syntax for this increment in range? Then I am going to repeat the formating steps on this range. It would do this untill the end of data. Appreciate your help please. Thanks Syed -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=498394 -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
syntax for range selection
For the help. It worked out very well. sye -- sazi ----------------------------------------------------------------------- saziz's Profile: http://www.excelforum.com/member.php...nfo&userid=635 View this thread: http://www.excelforum.com/showthread.php?threadid=49839 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Identifying a selection of a selection of a range | Excel Worksheet Functions | |||
Using ColumnNumber in Range syntax | Excel Programming | |||
Range syntax | Excel Programming | |||
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. | Excel Programming | |||
Syntax - Add Range Name based on Selection | Excel Programming |