Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modify Macro To LookUp 2 Tables
I am using this code:
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[9],refman,2,FALSE)" Selection.Copy I need to break up the table "refman" into 2 tables. Is it possible to have the vlookup check both tables ( say refman1 and refman2) ? Thank you in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modify Macro To LookUp 2 Tables
The formula gets a bit ugly.
=if(countif(refman1, RC[9])0, vlookup(RC[9],refman1,2,false),if(countif(refman2, RC[9])0, vlookup(RC[9],refman2,2,false),"Not Found")) Or something close to that... -- HTH... Jim Thomlinson "carl" wrote: I am using this code: ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[9],refman,2,FALSE)" Selection.Copy I need to break up the table "refman" into 2 tables. Is it possible to have the vlookup check both tables ( say refman1 and refman2) ? Thank you in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modify Macro To LookUp 2 Tables
Thank you Jim. I tried placing this code and received a Compiler Error /
Syntax. Here's the code I used: ActiveCell.FormulaR1C1 = "=if(countif(refman1; RC[9])0; " vlookup(RC[9];refman1;2;false);if(countif(refman2; RC[9])0; vlookup(RC[9];refman2;2;false);"Not Found")) " "Jim Thomlinson" wrote: The formula gets a bit ugly. =if(countif(refman1, RC[9])0, vlookup(RC[9],refman1,2,false),if(countif(refman2, RC[9])0, vlookup(RC[9],refman2,2,false),"Not Found")) Or something close to that... -- HTH... Jim Thomlinson "carl" wrote: I am using this code: ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[9],refman,2,FALSE)" Selection.Copy I need to break up the table "refman" into 2 tables. Is it possible to have the vlookup check both tables ( say refman1 and refman2) ? Thank you in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I need to modify my macro ... | Excel Discussion (Misc queries) | |||
Modify A Macro | Excel Worksheet Functions | |||
Modify a Macro | Excel Worksheet Functions | |||
Modify a macro | Excel Programming | |||
Help to modify macro please | Excel Programming |