Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
How do i re-define the following range in cell notation so variables can be used for the column and row? Dim tbl as range Set tbl = .Range(.Range("D6"), .Range("D6:D" & ..Range("D65536").End(xlUp).Row)) Works fine but is fixed. Dim rownum as integer Dim colnum as integer rownum=6 'initially colnum=4 'initially I just cannot get anything to work. The next line seemed ok at first and produced the expected answer. But then it failed and in testing i found it produced "D5:Dxxxx and not D6:Dxxxx as expected. Set tbl = .Range(.Cells(6, colnum), .Cells(65536, colnum).End(xlUp)) I would very much appreciate some help on something which seems so simple to convert. T.I.A. Geoff |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Define Name range | Excel Discussion (Misc queries) | |||
How do I define a range using values in cells? | Excel Worksheet Functions | |||
Define a range of cells in VBA | Excel Discussion (Misc queries) | |||
Define a range based on another named range | Excel Worksheet Functions | |||
Define Range Name | Excel Programming |