View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
njuneardave
 
Posts: n/a
Default VLOOKUP - returning the searched for value if it does not exis

Franz, I tried what you said.....this is what I put:


=IF(ISERROR(INDEX(Sheet2!B$2:B$9000,MATCH(1,(Sheet 1!$A$2:$A$9000=Sheet2!$A2)*(Sheet1!$E$2:$E$9000=Sh eet2!$E2),0))),
"",
IF(INDEX(Sheet2!B$2:B$9000,MATCH(1,(Sheet1!$A$2:$A $9000=Sheet2!$A2)*(Sheet1!$E$2:$E$9000=Sheet2!$E2) ,0))
=
INDEX(Sheet1!B$2:B$9000,MATCH(1,(Sheet2!$A$2:$A$90 00=Sheet1!$A2)*(Sheet2!$E$2:$E$9000=Sheet1!$E2),0) ),
"",
INDEX(Sheet2!B$2:B$9000,MATCH(1,(Sheet1!$A$2:$A$90 00=Sheet2!$A2)*(Sheet1!$E$2:$E$9000=Sheet2!$E2),0) )))


for some, it returns an #N/A. for others it returns a number....but the
index is off... i want to either return the value at A2 for Sheet2 or nothing
at all. What is wrong with this?


Thanks alot, i really appreciate the help




"Franz Verga" wrote:

Nel post
*njuneardave* ha scritto:

Wow, thanks Franz, that worked great. Now a follow-up question: I
am having
the same problem using INDEX and MATCH....here is what I have:


=IF(INDEX(Sheet2!$B$2:$B$9000,MATCH(1,(Sheet1!$A$2 :$A$9000=Sheet2!$A2)*(Sheet1!$E$2:$E$9000=Sheet2!$ E2),0))
<
INDEX(Sheet1!$B$2:$B$9000,MATCH(1,(Sheet2!$A$2:$A$ 9000=Sheet1!$A2)*(Sheet2!$E$2:$E$9000=Sheet1!$E2), 0)),
INDEX(Sheet2!$B$2:$B$9000,MATCH(1,(Sheet1!$A$2:$A$ 9000=Sheet2!$A2)*(Sheet1!$E$2:$E$9000=Sheet2!$E2), 0)),
"")


I am trying to see if the value in sheet1 and sheet2 that are
respective to
their identifiers (in columns A and E) are equal. If they are equal,
i dont
show anything, but if they are different, I want to show the value in
Sheet2.
Is this formula way over complicated? Also, can i use indirect on
this
formula to get rid of the #N/A references?

Yes, in the same manner I showed you in my last post...

Thanks in advance!


You're welcome (in advance...)


--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy