Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need to Select multiple cells based on counter
Hey,
I'm having trouble finding how to make a selection of cells usin integer values rather than text i.e. Range("A1:A5") Is there a way to use Range with integer values? I need to make selections of cells based on an integer counter in a VB Script Thanks!! -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need to Select multiple cells based on counter
A couple of ways:
For only one column - Range("A" & iFirstRow & ":A" & iLastRow) where ifirstrow and ilastrow are the row range. Or- Range(Cells(iFirstRow, iFirstCol), Cells(iLastRow, iLastCol)) to select from multiple contiguous rows and columns. -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need to Select multiple cells based on counter
You can use Cells
Sub test() Range(Cells(1, 1), Cells(5, 1)).Select End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Skyron " wrote in message ... Hey, I'm having trouble finding how to make a selection of cells using integer values rather than text i.e. Range("A1:A5") Is there a way to use Range with integer values? I need to make selections of cells based on an integer counter in a VBA Script Thanks!!! --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need to Select multiple cells based on counter
I find it easier to use the Cells() object, something like
Cells(myrownumber, mycolumnnumber) -- Regards Juan Pablo González "Skyron " wrote in message ... Hey, I'm having trouble finding how to make a selection of cells using integer values rather than text i.e. Range("A1:A5") Is there a way to use Range with integer values? I need to make selections of cells based on an integer counter in a VBA Script Thanks!!! --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
select value in table based on values entered in multiple cells | Excel Worksheet Functions | |||
How do I Select Multiple Non Adjacent Rows based on a cell value? | Excel Worksheet Functions | |||
How to increase counter based on values in 2 different cells | Excel Worksheet Functions | |||
Is there a smart way to select multiple rows based on #2 :) | Excel Programming | |||
Is there a smart way to select multiple rows based on column... | Excel Programming |