Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
variable range
Hi
Does anyone know how to put a variable into a range? The range is a list in column A which is refreshed when the workbook is opened. This list is then loaded into a combobox on a form. using the range notation Range("x:y") x is a constant of A2 and y is the variable mylastcell which has a maximum value of A138 ie range("A2:A138") However I only want to display the cells that have something in them in the combobox, in order not to have blank spaces at the bottom. I'm able to return the address of the last cell with something in it by using mylastcell = Range("A2").End(xlDown).Address (ROWABSOLUTE:=False) However, having obtained a value for mylastcell, I'm unable to put it into range notation eg range("A2:mylastcell") I need your help! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use Sum() with variable range | Excel Worksheet Functions | |||
Variable Range | Excel Discussion (Misc queries) | |||
variable range | New Users to Excel | |||
Variable Range | Excel Worksheet Functions | |||
Variable range in VB | Excel Discussion (Misc queries) |