IF and VLookup

Ryan1974

New Member
Joined
Sep 12, 2012
Messages
13
Hi.
I have 2 sheets.
Need to lookup the value from one in the other and if the values match then it needs to check for a second parameter in the first sheet and compare to second sheet and if all matches then display a value from the second sheet in the first.
So say the sheets are X and Y then I Need to grab Value 1 from X and find it in Y.
If value 1 is found in Y then code goes back to sheet X to find value 2 and find it in Y.
If value 2 is found then value 3 from sheet Y is displayed in sheet X.
Does that make sense?
No idea if VBA code might be easier therefore any input is welcome.
Thank you
Ryan
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Worksheet formula: INDEX(MATCH or LOOKUP can do the job.
Fast answer needs visual help.
Try to attach a screenshot/XL2BB or share a sample file
 
Upvote 0
There are multiple methods that could be used for this but the descriptions are too ambiguous for us to provide a useful answer.

Where are values in sheet Y, are they in rows, columns, or matrices?

Are the values to return (value 3 in your description) numeric or text?
 
Upvote 0
Hi
thank you for your replies and sorry for the wait, took a while to do the test file.
Anyways, 2 sheets, Anonym 1 and 2, Instructions can be seen on 2nd sheet.
Hope that makes it more clear.
Values to return can be alphanumeric.
 

Attachments

  • Anonym1.jpg
    Anonym1.jpg
    94.1 KB · Views: 7
  • Anonym2.jpg
    Anonym2.jpg
    155.9 KB · Views: 6
Upvote 0
It is preferable that you use XL2BB to post any examples to the forum, when you post screen captures we have to try and remember your entire layout as we cannot view it and type a reply at the same time.

The basic principle of the formula that you will need is
Excel Formula:
=IFERROR(LOOKUP(2,1/('Anonym1'!$A$2:$A$10=$C2)/('Anonym1'!$E$2:$E$10=$D2),'Anonym1'!$D$2:$D$10),"No Match")
 
Upvote 0
Hi
@jasonb75 I tried to download it but system would not let me install, although i removed the protected view, it still had issues with the macro and nothing i tried worked. Conclusion: cannot download XL2BB.
Thx for the help
Br
Ryan
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,873
Members
449,056
Latest member
ruhulaminappu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top