#N/A Error of to many arguments

Jbooze

Board Regular
Joined
Sep 1, 2005
Messages
59
The following formula works well as long as the vlookup finds data. I need to work an IFNA into this formula, but since I have an "IF" condition before the vlookup, I can't add ifna in front of the vlookup or I will get an error of to many arguments. Am I missing a simple work-around on this?

=IF(B3="","",IF(C3="","Enter Name",IF('PFP Goals'!$C$39=1,(VLOOKUP($C3,'Jan-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=2,(VLOOKUP($C3,'Feb-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=3,(VLOOKUP($C3,'Mar-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=4,(VLOOKUP($C3,'Apr-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=5,(VLOOKUP($C3,'May-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=6,(VLOOKUP($C3,'Jun-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=7,(VLOOKUP($C3,'Jul-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=8,(VLOOKUP($C3,'Aug-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=9,(VLOOKUP($C3,'Sep-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=10,(VLOOKUP($C3,'Oct-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=11,(VLOOKUP($C3,'Nov-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=12,(VLOOKUP($C3,'Dec-Pay Paste'!$C$4:$Z$498,3,FALSE)),0))))))))))))))

Thanks,

Jeff
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
6,007
Office Version
  1. 2016
Platform
  1. Windows
Hi,

Wrap your entire formula within IFNA:

=IFNA(your formula,value if na)
 

Jbooze

Board Regular
Joined
Sep 1, 2005
Messages
59
I guess I am not following. This say to many arguments too.


=IFNA(B6="","",IF(C6="","Enter Name",IF('PFP Goals'!$C$39=1,(VLOOKUP($C6,'Jan-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=2,(VLOOKUP($C6,'Feb-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=3,(VLOOKUP($C6,'Mar-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=4,(VLOOKUP($C6,'Apr-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=5,(VLOOKUP($C6,'May-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=6,(VLOOKUP($C6,'Jun-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=7,(VLOOKUP($C6,'Jul-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=8,(VLOOKUP($C6,'Aug-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=9,(VLOOKUP($C6,'Sep-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=10,(VLOOKUP($C6,'Oct-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=11,(VLOOKUP($C6,'Nov-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=12,(VLOOKUP($C6,'Dec-Pay Paste'!$C$4:$Z$498,3,FALSE)),0)))))))))))))),0)

Thanks,

Jeff
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
6,007
Office Version
  1. 2016
Platform
  1. Windows
No, Wrap your ENTIRE ORIGINAL formula within IFNA:

=IFNA(IF(B3="","",IF(C3="","Enter Name",IF('PFP Goals'!$C$39=1,(VLOOKUP($C3,'Jan-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=2,(VLOOKUP($C3,'Feb-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=3,(VLOOKUP($C3,'Mar-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=4,(VLOOKUP($C3,'Apr-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=5,(VLOOKUP($C3,'May-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=6,(VLOOKUP($C3,'Jun-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=7,(VLOOKUP($C3,'Jul-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=8,(VLOOKUP($C3,'Aug-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=9,(VLOOKUP($C3,'Sep-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=10,(VLOOKUP($C3,'Oct-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=11,(VLOOKUP($C3,'Nov-Pay Paste'!$C$4:$Z$498,3,FALSE)),IF('PFP Goals'!$C$39=12,(VLOOKUP($C3,'Dec-Pay Paste'!$C$4:$Z$498,3,FALSE)),0))))))))))))))
,"")
 
Last edited:

Robby19

Board Regular
Joined
Mar 19, 2018
Messages
227

ADVERTISEMENT

I may be mistaken, but I believe the max number of Nested IF statements is 7. Currently you have 12. You would most likely do better by utilizing hidden "helper columns" which would enable you to separate your IF statements. You could then reference back to the hidden columns using another IF formula. Let me know if you need assistance with this or if it what I said doesn't make sense.
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
6,007
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

You're welcome.
 

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
10,967
Even though 64 levels are allowed, generally speaking, a formula that long is hard to read and understand. You can condense that entire formula to something like this:

=IFNA(IF(B3="","",IF(C3="","Enter Name",VLOOKUP($C3,INDIRECT("'"&TEXT(DATE(2000,'PFP Goals'!$C$39,1),"mmm")&"-Pay Paste'!$C$4:$Z$498"),3,FALSE))),"")

using the INDIRECT to select the sheet instead of 12 levels of IFs.
 

Watch MrExcel Video

Forum statistics

Threads
1,133,271
Messages
5,657,759
Members
418,411
Latest member
Excellency

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
Top