# Nested if error

I have tried to modify this formula, but now getting error - I know I'm using wrong number of parenthesis or something simple, but can't figure it out!
Can anyone help??

``````=IF(OR(K2="SPOZ",K2="SPOZDEF"),AB2,ROUNDUP(IF(AND(OR(\$K2={"SPLB","SPLBDEF","SPLBHW","SPLBDEFHW"}),'Enter Data'!\$B\$4=""),\$G2/'Enter Data'!\$A\$4,IF(AND(OR(\$K2={"SPLB","SPLBDEF","SPLBHW","SPLBDEFHW"}),\$G2>=('Enter Data'!\$B\$4*1728)),\$G2/'Enter Data'!\$C\$4,IF(AND(OR(\$K2={"SPLB","SPLBDEF","SPLBHW","SPLBDEFHW"}), \$G2/'Enter Data'!\$A\$4, IF(AND(OR(\$A2={"E2","ESP","FO","PO","SO","E2AM","F1","F2","F3"}),'Enter Data'!\$B\$2=""),\$G2/'Enter Data'!\$A\$2, IF(AND(OR(\$A2={"E2","ESP","FO","PO","SO","E2AM","F1","F2","F3"}),\$G2>=('Enter Data'!\$B\$2*1728)),\$G2/'Enter Data'!\$A\$2, IF(AND(OR(\$A2={"E2","ESP","FO","PO","SO","E2AM","F1","F2","F3"}),\$G2<('Enter Data'!\$B\$2*1728)),\$G2/'Enter Data'!\$C\$2, IF(AND(\$A2="HD",'Enter Data'!\$B\$7=""),\$G2/'Enter Data'!\$A\$7,IF(AND(\$A2="HD",\$G2>=('Enter Data'!\$B\$7*1728)),\$G2/'Enter Data'!\$A\$7, IF(AND(\$A2="HD",\$G2<('Enter Data'!\$B\$4*1728)),\$G2/'Enter Data'!\$C\$7, IF(AND(OR(\$A2={"GR","PRP"}),'Enter Data'!\$B\$4=""),\$G2/'Enter Data'!\$A\$4, IF(AND(OR(\$A2={"GR","PRP"}),\$G2>=('Enter Data'!\$B\$4*1728)),\$G2/'Enter Data'!\$A\$4,IF(AND(OR(\$A2={"GR","PRP"}), \$G2<('Enter Data'!\$B\$4*1728)),\$G2/'Enter Data'!\$C\$4,IF(\$E2="PR",\$G2/'Enter Data'!\$A\$2,IF(AND(OR(\$A2={"IP","IE","IPF","IEF"}), 'Enter Data'!\$B\$10="",D2="Exp"),\$G2/'Enter Data'!\$A\$10,IF(AND(OR(\$A2={"IP","IE","IPF","IEF"}),\$G2>=('Enter Data'!\$B\$10*1728),D2="Exp"), \$G2/'Enter Data'!\$A\$10,IF(AND(OR(\$A2={"IP","IE","IPF","IEF"}),\$G2<('Enter Data'!\$B\$10*1728),D2="Exp"), \$G2/'Enter Data'!\$C\$10,IF(AND(OR(\$A2={"IP","IE","IPF","IEF"}),'Enter Data'!\$B\$13="",D2="Imp"),\$G2/'Enter Data'!\$A\$13, IF(AND(OR(\$A2={"IP","IE","IPF","IEF"}),\$G2>=('Enter Data'!\$B\$13*1728),D2="Imp"),\$G2/'Enter Data'!\$A\$13, IF(AND(OR(\$A2={"IP","IE","IPF","IEF"}),\$G2<('Enter Data'!\$B\$13*1728),D2="Imp"),\$G2/'Enter Data'!\$C\$13,0)))))))))))))))))))),0))
``````
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Excel & VBA ExpertCommented:
Does this work?
``````=IF(OR(K2="SPOZ",K2="SPOZDEF"),AB2,ROUNDUP(IF(AND(OR(\$K2={"SPLB","SPLBDEF","SPLBHW","SPLBDEFHW"}),'Enter Data'!\$B\$4=""),\$G2/'Enter Data'!\$A\$4,IF(AND(OR(\$K2={"SPLB","SPLBDEF","SPLBHW","SPLBDEFHW"}),\$G2>=('Enter Data'!\$B\$4*1728)),\$G2/'Enter Data'!\$C\$4,IF(AND(OR(\$K2={"SPLB","SPLBDEF","SPLBHW","SPLBDEFHW"})), \$G2/'Enter Data'!\$A\$4, IF(AND(OR(\$A2={"E2","ESP","FO","PO","SO","E2AM","F1","F2","F3"}),'Enter Data'!\$B\$2=""),\$G2/'Enter Data'!\$A\$2, IF(AND(OR(\$A2={"E2","ESP","FO","PO","SO","E2AM","F1","F2","F3"}),\$G2>=('Enter Data'!\$B\$2*1728)),\$G2/'Enter Data'!\$A\$2, IF(AND(OR(\$A2={"E2","ESP","FO","PO","SO","E2AM","F1","F2","F3"}),\$G2<('Enter Data'!\$B\$2*1728)),\$G2/'Enter Data'!\$C\$2, IF(AND(\$A2="HD",'Enter Data'!\$B\$7=""),\$G2/'Enter Data'!\$A\$7,IF(AND(\$A2="HD",\$G2>=('Enter Data'!\$B\$7*1728)),\$G2/'Enter Data'!\$A\$7, IF(AND(\$A2="HD",\$G2<('Enter Data'!\$B\$4*1728)),\$G2/'Enter Data'!\$C\$7, IF(AND(OR(\$A2={"GR","PRP"}),'Enter Data'!\$B\$4=""),\$G2/'Enter Data'!\$A\$4, IF(AND(OR(\$A2={"GR","PRP"}),\$G2>=('Enter Data'!\$B\$4*1728)),\$G2/'Enter Data'!\$A\$4,IF(AND(OR(\$A2={"GR","PRP"}), \$G2<('Enter Data'!\$B\$4*1728)),\$G2/'Enter Data'!\$C\$4,IF(\$E2="PR",\$G2/'Enter Data'!\$A\$2,IF(AND(OR(\$A2={"IP","IE","IPF","IEF"}), 'Enter Data'!\$B\$10="",D2="Exp"),\$G2/'Enter Data'!\$A\$10,IF(AND(OR(\$A2={"IP","IE","IPF","IEF"}),\$G2>=('Enter Data'!\$B\$10*1728),D2="Exp"), \$G2/'Enter Data'!\$A\$10,IF(AND(OR(\$A2={"IP","IE","IPF","IEF"}),\$G2<('Enter Data'!\$B\$10*1728),D2="Exp"), \$G2/'Enter Data'!\$C\$10,IF(AND(OR(\$A2={"IP","IE","IPF","IEF"}),'Enter Data'!\$B\$13="",D2="Imp"),\$G2/'Enter Data'!\$A\$13, IF(AND(OR(\$A2={"IP","IE","IPF","IEF"}),\$G2>=('Enter Data'!\$B\$13*1728),D2="Imp"),\$G2/'Enter Data'!\$A\$13, IF(AND(OR(\$A2={"IP","IE","IPF","IEF"}),\$G2<('Enter Data'!\$B\$13*1728),D2="Imp"),\$G2/'Enter Data'!\$C\$13,0))))))))))))))))))),0))
``````

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
THANK YOU!!!
Excel & VBA ExpertCommented:
You'r welcome!
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.