Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
I'm trying to write a macro that will import a sheet from another workbook(say, X) and then add stuff to each of the rows by using a vlookup formula that looks in the second worksheet of the original workbook (say, Y). The first sheet in Y will have some rows that are different to those in sheet 2 in Y but will also have some of the same ones. For those that are the same, the vlookup will return some comments from sheet 2. The problem, however, is that the sheet names are always different because they come from a file that is generated on a daily basis. Is it possible to put a relative reference into the vlookup formula that will look on the second sheet instead of sheet(...)? Specifically, the formula in my macro looks like this: ActiveCell.FormulaR1C1 = _ "=VLOOKUP(RC[-16],0529080946!RC[-16]:R[1056]C,16,FALSE)" and I am trying to change the "0529080946!" to sheets(2) in my workbook. Thank you in advance for your help. Michael |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Relative Cell Referencing in MS Excel | Excel Discussion (Misc queries) | |||
Relative referencing in Microsoft Excel between worksheets | Excel Discussion (Misc queries) | |||
Allow relative referencing for imbedded sheetnames in formulas | Excel Worksheet Functions | |||
Relative column referencing within formulas | Excel Discussion (Misc queries) | |||
How do I turn off relative cell referencing in excel? | New Users to Excel |