NEED HELP ON nested if vlookup formula

jaik22

Board Regular
Joined
Sep 23, 2016
Messages
102
Code:
=IF(Acct=Hide_Only,IF(VLOOKUP(F4&$B$13,$Y$13:$AF$429,IF($Z$11=$B$6,2,IF($B$6=$AA$11,3,IF($B$6=$AB$11,4,5))),FALSE)<d3,d3,vlookup(f4&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,5))),false)),vlookup(f4&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,5))),false))<d6,d6,vlookup(f7&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,5))),false)),vlookup(f7&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,5))),false))[ code]
This is the original code and it works fine, but If I add fields into vlookup formula it does not work. The code below is what I wrote for new added columns.(column AC:AF are added)

Code:
=IF(Acct=Hide_Only,IF(VLOOKUP(F6&$B$13,$Y$13:$AF$429,IF($Z$11=$B$6,2,IF($B$6=$AA$11,3,IF($B$6=$AB$11,4,IF($B$6=$AC$11,5,IF($B$6=$AD$11,6,IF($B$6=$AE$11,7,IF($B$6=$AF$11,8))))))),FALSE)<d5,d5,vlookup(f6&$b$13,$y$13:$af$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,if($b$6=$ac$11,5,if($b$6=$ad$11,6,if($b$6=$ae$11,7,if($b$6=$af$11,8))))))),false)),vlookup(f6&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,if($b$6=$ac$11,5,if($b$6=$ad$11,6,if($b$6=$ae$11,7,if($b$6=$af$11,8))))))),false))[ code]
<d4,d4,vlookup(f5&$b$13,$y$13:$af$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,if($b$6=$ac$11,5,if($b$6=$ad$11,6,if($b$6=$ae$11,7,8)))))),false)),vlookup(f5&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,if($b$6=$ac$11,5,if($b$6=$ad$11,6,if($b$6=$ae$11,7,8)))))),false))[ code]
<d5,d5,vlookup(f6&$b$13,$y$13:$af$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,if($b$6=$ac$11,5,if($b$6=$ad$11,6,if($b$6=$ae$11,7,if($b$6=$af$11,8))))))),false)),vlookup(f6&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,if($b$6=$ac$11,5,if($b$6=$ad$11,6,if($b$6=$ae$11,7,if($b$6=$af$11,8))))))),false))[ code]

Did I make any syntax error? Or am I missing anything? I gives me #REF! error.

Thank you</d5,d5,vlookup(f6&$b$13,$y$13:$af$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,if($b$6=$ac$11,5,if($b$6=$ad$11,6,if($b$6=$ae$11,7,if($b$6=$af$11,8))))))),false)),vlookup(f6&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,if($b$6=$ac$11,5,if($b$6=$ad$11,6,if($b$6=$ae$11,7,if($b$6=$af$11,8))))))),false))[></d4,d4,vlookup(f5&$b$13,$y$13:$af$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,if($b$6=$ac$11,5,if($b$6=$ad$11,6,if($b$6=$ae$11,7,8)))))),false)),vlookup(f5&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,if($b$6=$ac$11,5,if($b$6=$ad$11,6,if($b$6=$ae$11,7,8)))))),false))[></d5,d5,vlookup(f6&$b$13,$y$13:$af$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,if($b$6=$ac$11,5,if($b$6=$ad$11,6,if($b$6=$ae$11,7,if($b$6=$af$11,8))))))),false)),vlookup(f6&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,if($b$6=$ac$11,5,if($b$6=$ad$11,6,if($b$6=$ae$11,7,if($b$6=$af$11,8))))))),false))[></d3,d3,vlookup(f4&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,5))),false)),vlookup(f4&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,5))),false))<d6,d6,vlookup(f7&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,5))),false)),vlookup(f7&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,if($b$6=$aa$11,3,if($b$6=$ab$11,4,5))),false))[>
 
Last edited:

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
You original code is incorrect, you have 6 opening brackets and only 4 closing.

In your new formula since you cannot have a column 0 the implication is one of these IF(B6... will ALWAYS be true so the below should work
You should be able to replace all your IF(B6... with

MATCH($B$6,$Z$11:$AF$11)+1
 
Last edited:
Upvote 0
<d4,d4,vlookup(f5&$b$13,$y$13:$af$429,match($b$6,$z$11:$af$11)+1,false)),vlookup(f5&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,match($b$6,$z$11:$af$11)+1,false)))[ code]
<d4,d4,vlookup(f5&$b$13,$y$13:$af$429,match($b$6,$z$11:$af$11)+1,false)),vlookup(f5&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,match($b$6,$z$11:$af$11)+1,false)))[ code]
<d4,d4,vlookup(f5&$b$13,$y$13:$af$429,match($b$6,$z$11:$af$11)+1,false)),vlookup(f5&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,match($b$6,$z$11:$af$11)+1,false)))[ code]
<d4,d4,vlookup(f5&$b$13,$y$13:$af$429,match($b$6,$z$11:$af$11)+1,false)),vlookup(f5&$b$13,$y$13:$ac$429,
<d4,d4,vlookup(f5&$b$13,$y$13:$af$429,match($b$6,$z$11:$af$11)+1,false)),vlookup(f5&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,match($b$6,$z$11:$af$11)+1,false)))
<d4,d4,vlookup(f5&$b$13,$y$13:$af$429,match($b$6,$z$11:$af$11)+1,false)),
=IF(CPI_Rules=Increase_Only,IF(VLOOKUP(F5&$B$13,$Y$13:$AF$429,MATCH($B$6,$Z$11:$AF$11)+1,FALSE)<D4,D4,VLOOKUP(F5&$B$13,$Y$13:$AF$429,MATCH($B$6,$Z$11:$AF$11)+1,FALSE)),
VLOOKUP(F5&$B$13,$Y$13:$AC$429,IF($Z$11=$B$6,2,MATCH($B$6,$Z$11:$AF$11)+1,FALSE)))


So This is what I got. But still gives me "you've entered too many arguments for this function" error. Do you have any idea about this error?

Thank you so much for your support!</d4,d4,vlookup(f5&$b$13,$y$13:$af$429,match($b$6,$z$11:$af$11)+1,false)),
</d4,d4,vlookup(f5&$b$13,$y$13:$af$429,match($b$6,$z$11:$af$11)+1,false)),vlookup(f5&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,match($b$6,$z$11:$af$11)+1,false)))
</d4,d4,vlookup(f5&$b$13,$y$13:$af$429,match($b$6,$z$11:$af$11)+1,false)),vlookup(f5&$b$13,$y$13:$ac$429,
</d4,d4,vlookup(f5&$b$13,$y$13:$af$429,match($b$6,$z$11:$af$11)+1,false)),vlookup(f5&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,match($b$6,$z$11:$af$11)+1,false)))[></d4,d4,vlookup(f5&$b$13,$y$13:$af$429,match($b$6,$z$11:$af$11)+1,false)),vlookup(f5&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,match($b$6,$z$11:$af$11)+1,false)))[></d4,d4,vlookup(f5&$b$13,$y$13:$af$429,match($b$6,$z$11:$af$11)+1,false)),vlookup(f5&$b$13,$y$13:$ac$429,if($z$11=$b$6,2,match($b$6,$z$11:$af$11)+1,false)))[>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,107
Members
452,302
Latest member
TaMere

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