flicky_longcartridge
New Member
- Joined
- Nov 19, 2008
- Messages
- 29
Hi,
I am having some trouble creating a macro to copy a vlookup formula from the 1st line of data (G2) all the way to the last row. I can easily create the VLOOKUP statement:
=VLOOKUP(A2,HIST!A$2:H$269,8,FALSE)
However this has 2 problems, firstly the range size will change, depending on the number of rows of data i.e. HIST!A$2:H$269 will not work if there are 300 lines of data.
After I have this issue solved, I then need to find a way of copying that formula down (Autofill) to the last row of data in column G on the page that the formula is running (called HISTFCST)
Any help would be much appreciated
I am having some trouble creating a macro to copy a vlookup formula from the 1st line of data (G2) all the way to the last row. I can easily create the VLOOKUP statement:
=VLOOKUP(A2,HIST!A$2:H$269,8,FALSE)
However this has 2 problems, firstly the range size will change, depending on the number of rows of data i.e. HIST!A$2:H$269 will not work if there are 300 lines of data.
After I have this issue solved, I then need to find a way of copying that formula down (Autofill) to the last row of data in column G on the page that the formula is running (called HISTFCST)
Any help would be much appreciated