View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_5_] Jim Thomlinson[_5_] is offline
external usenet poster
 
Posts: 486
Default 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.