Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does anybody know what the marco command(s) are for
selecting a range of cells in a column using a variable? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
yes, hope this example helps:
Sub SelectRows2To5InCol() Dim Col Col = 3 Range(Cells(2, Col), Cells(5, Col)).Select End Sub regards, Mika "Bob J." wrote in message ... Does anybody know what the marco command(s) are for selecting a range of cells in a column using a variable? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks! This is exactly what I was looking for.
-----Original Message----- yes, hope this example helps: Sub SelectRows2To5InCol() Dim Col Col = 3 Range(Cells(2, Col), Cells(5, Col)).Select End Sub regards, Mika "Bob J." wrote in message ... Does anybody know what the marco command(s) are for selecting a range of cells in a column using a variable? . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob,
If its the row, its easy Range("A" & startRow & ":B" & endRow).Select Columns are just as easy if your variable is a letter, but if it is a number, you either convert to a letter Range("A1:" & Chr(startcol + 64) & "10").Select or use Cells Range("A1", Cells(10, startcol)).Select -- HTH Bob Phillips "Bob J." wrote in message ... Does anybody know what the marco command(s) are for selecting a range of cells in a column using a variable? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find a single value from tables by selecting two variable inputs? | Excel Worksheet Functions | |||
Selecting a variable print area in a macro | Excel Discussion (Misc queries) | |||
macro syntax for selecting variable range | Excel Discussion (Misc queries) | |||
Selecting Variable Data Ranges | Excel Discussion (Misc queries) | |||
Selecting rows with variable | Excel Programming |