3 Nested IFERROR Functions with VLOOKUP

Kronik

New Member
Joined
Jan 23, 2016
Messages
16
I am getting an error of ' you have entered too many arguments' for this function. Can you please advise what i am doing wrong?

Thanks in advance:

=IFERROR(m2=130,VLOOKUP(J2,Mapping!A:C,3,FALSE), IFERROR(M2=1&D2="FZ",VLOOKUP(D2,Mapping!B:C,2,FALSE), iferror(vlookup(d2,Mapping!B:C,2,false),))
 
So from what I can gather, you have 4 possible scenarios (2 cells that have 2 possible values each)..
Please fill in the ???

If M2 = 130 AND D2 = FZ, then I want ???? This one is not a criteria

If M2 = 130 AND D2 = CV, then I want ???? - J2,Mapping!A:C,3
If M2 = 1 AND D2 = FZ, then I want ???? - D2,Mapping!B:C,2


If M2 = 1 AND D2 = CV, then I want ???? - not needed

But for all other scenarios:
d2,Mapping!B:C,2,

Only when the code is per the two above in red, does it need to do that, for all other cases, it needs to do the last option above in blue.

Thanks again.
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
You see how you have
But for all other scenarios:
d2,Mapping!B:C,2,
That vlookup is exactly the same as the vlookup for your second criteria
If M2 = 1 AND D2 = FZ, then I want ???? - D2,Mapping!B:C,2

So, M2 = 1 AND D2 = FZ can be inculded in the "But for all other scenarios"

So that can be rephrased simply as
If M2 = 130 AND D2 = CV, then I want - J2,Mapping!A:C,3
But for all other scenarios, then I want - d2,Mapping!B:C,2,


So all you need is
=IFERROR(IF(AND(M2=130,D2="CV"),VLOOKUP(J2,Mapping!A:C,3,FALSE),VLOOKUP(D2,Mapping!B:C,2,FALSE)),"")

 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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