Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am writing code to add a vlookup function to a column of cells. Each time
the macro is run (because data is added to the spreadsheet), the lookup table changes in size. The columns and start row don't change, but the end row may increase. I have a variable LastRow that holds the row number of the end of the table. How do I incorporate that into my code? Usinge the recorder, I'm starting with this - I want to change "Sheet4!R2C1:R113C4" to something like "Sheet4!R2C1:R'LastRow'C4" ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-2],Sheet4!R2C1:R113C4,4,0)" |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
DDE formula with variable | Excel Worksheet Functions | |||
variable in a formula | Excel Programming | |||
Variable in a Formula | Excel Programming | |||
Variable in a formula | Excel Programming | |||
Variable to formula. | Excel Programming |