Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Vlookup to another worksheet

Status
Not open for further replies.

wayneryeven

Technical User
May 21, 2004
101
GB
Hey all
At present i do a lookup to another worksheet in a workbook via a named range.

ActiveCell.FormulaR1C1 = "=IF(ISNA(VLOOKUP(RC[-3],ActualProduction,2,FALSE)),0,(VLOOKUP(RC[-3],ActualProduction,2,FALSE)))"

However, i need to edit this so that it looks up to a workbook called PROD.xls, to Sheet 1. For clarity and understanding, how would i edit the above coede to reflect this?

Many Thanks to all.
 
oh the workbook will be closed most likely prior to lookup..
 
hi,

"For clarity and understanding, how would i edit the above coede to reflect this?"

You should never need to type a range reference in a formula. As you type the formula, when you get to a range reference, you point and click on the objects (workbook, worksheet, cells) of interest to complete the reference on the sheet. That will give you the syntax for your code.


Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I 'cheat', sometimes - when point and click doesn't seem to work. Temporarily move one worksheet so that both are in the same workbook. Do your lookup formula, using named ranges if possible (and insert, name, paste). Then move the worksheet back to its proper workbook. Save the workbooks.



Gavin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top