Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am trying to run a vlookup through a macro but need the range to vary depending on the numbers of rows of data (which will be different every time). Currently I have just used a fixed range in the code Sub fillDownLookup() Range("ah2").Select ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-13],Lookup!R2C6:R328C7,2,FALSE)" Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select Range("AH2:AH4000").Select Selection.FillDown End Sub I would appreciate any advice of sugguestions that would replace the fixed "Range("AH2:AH4000")" with code for a dynamic range cheers R |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with copying dynamic column selected based on remote cell value and dynamic formula fill | Charts and Charting in Excel | |||
Help with copying dynamic column selected based on remote cell value and dynamic formula fill | Excel Programming | |||
ListBox "dynamic fill range" | Excel Programming | |||
automatic data fill , based on list into dynamic range | Excel Programming | |||
Excel 2000 VBA - Set Print Range in dynamic range | Excel Programming |