formula can't be entered because it uses more than 64 levels of nesting

xtremeusta

New Member
Joined
Oct 9, 2022
Messages
14
Office Version
  1. 365
Platform
  1. MacOS
hope anyone can help.

if the month is greater then 0 but equal to or less then 12, and Cell C88 = Cell C41 (the formula needs to check against additional cells up to C50) then divide cell d69 (the formula needs to check against additional cells up to d78) by 12

i am trying to accomplish this for 10-years meaning month 0-12, month 13-24, month 25-36, month 37-48, month 49-60, month61-72, month 73-84, month 85-96, month97-108, month109-120

=IF(AND(D92>0,D92<13,$C88=$C$41),$D$69/12,IF(AND(D92>0,D92<13,$C88=$C$42),$D$70/12,IF(AND(D92>0,D92<13,$C88=$C$43),$D$71/12,IF(AND(D92>0,D92<13,$C88=$C$44),$D$72/12,IF(AND(D92>0,D92<13,$C88=$C$45),$D$73/12,IF(AND(D92>0,D92<13,$C88=$C$46),$D$74/12,IF(AND(D92>0,D92<13,$C88=$C$47),$D$75/12,IF(AND(D92>0,D92<13,$C88=$C$48),$D$76/12,IF(AND(D92>0,D92<13,$C88=$C$49),$D$77/12,IF(AND(D92>0,D92<13,$C88=$C$50),$D$78/12,IF(AND(D92>12,D92<25,$C88=$C$41),$E$69/12,IF(AND(D92>12,D92<25,$C88=$C$42),$E$70/12,IF(AND(D92>12,D92<25,$C88=$C$43),$E$71/12,IF(AND(D92>12,D92<25,$C88=$C$44),$E$72/12,IF(AND(D92>12,D92<25,$C88=$C$45),$E$73/12,IF(AND(D92>12,D92<25,$C88=$C$46),$E$74/12,IF(AND(D92>12,D92<25,$C88=$C$47),$E$75/12,IF(AND(D92>12,D92<25,$C88=$C$48),$E$76/12,IF(AND(D92>12,D92<25,$C88=$C$49),$E$77/12,IF(AND(D92>12,D92<25,$C88=$C$50),$E$78/12,IF(AND(D92>24,D92<37,$C88=$C$41),$F$69/12,IF(AND(D92>24,D92<37,$C88=$C$42),$F$70/12,IF(AND(D92>24,D92<37,$C88=$C$43),$F$71/12,IF(AND(D92>24,D92<37,$C88=$C$44),$F$72/12,IF(AND(D92>24,D92<37,$C88=$C$45),$F$73/12,IF(AND(D92>24,D92<37,$C88=$C$46),$F$74/12,IF(AND(D92>24,D92<37,$C88=$C$47),$F$75/12,IF(AND(D92>24,D92<37,$C88=$C$48),$F$76/12,IF(AND(D92>24,D92<37,$C88=$C$49),$F$77/12,IF(AND(D92>24,D92<37,$C88=$C$50),$F$78/12,IF(AND(D92>36,D92<49,$C88=$C$41),$G$69/12,IF(AND(D92>36,D92<49,$C88=$C$42),$G$70/12,IF(AND(D92>36,D92<49,$C88=$C$43),$G$71/12,IF(AND(D92>36,D92<49,$C88=$C$44),$G$72/12,IF(AND(D92>36,D92<49,$C88=$C$45),$G$73/12,IF(AND(D92>36,D92<49,$C88=$C$46),$G$74/12,IF(AND(D92>36,D92<49,$C88=$C$47),$G$75/12,IF(AND(D92>36,D92<49,$C88=$C$48),$G$76/12,IF(AND(D92>36,D92<49,$C88=$C$49),$G$77/12,IF(AND(D92>36,D92<49,$C88=$C$50),$G$78/12,IF(AND(D92>48,D92<61,$C88=$C$41),$H$69/12,IF(AND(D92>48,D92<61,$C88=$C$42),$H$70/12,IF(AND(D92>48,D92<61,$C88=$C$43),$H$71/12,IF(AND(D92>48,D92<61,$C88=$C$44),$H$72/12,IF(AND(D92>48,D92<61,$C88=$C$45),$H$73/12,IF(AND(D92>48,D92<61,$C88=$C$46),$H$74/12,IF(AND(D92>48,D92<61,$C88=$C$47),$H$75/12,IF(AND(D92>48,D92<61,$C88=$C$48),$H$76/12,IF(AND(D92>48,D92<61,$C88=$C$49),$H$77/12,IF(AND(D92>48,D92<61,$C88=$C$50),$H$78/12))))))))))))))))))))))))))))))))))))))))))))))))))
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
The IFS function can nest upto 127 statements if I'm not wrong...

Try this - I'm only using what you gave to populate IFS function. So if rest is fine you can add more conditions at the end to it to test

Excel Formula:
=IFS(AND(D92>0,D92<13,$C88=$C$41),$D$69/12,AND(D92>0,D92<13,$C88=$C$42),$D$70/12,AND(D92>0,D92<13,$C88=$C$43),$D$71/12,AND(D92>0,D92<13,$C88=$C$44),$D$72/12,AND(D92>0,D92<13,$C88=$C$45),$D$73/12,AND(D92>0,D92<13,$C88=$C$46),$D$74/12,AND(D92>0,D92<13,$C88=$C$47),$D$75/12,AND(D92>0,D92<13,$C88=$C$48),$D$76/12,AND(D92>0,D92<13,$C88=$C$49),$D$77/12,AND(D92>0,D92<13,$C88=$C$50),$D$78/12,AND(D92>12,D92<25,$C88=$C$41),$E$69/12,AND(D92>12,D92<25,$C88=$C$42),$E$70/12,AND(D92>12,D92<25,$C88=$C$43),$E$71/12,AND(D92>12,D92<25,$C88=$C$44),$E$72/12,AND(D92>12,D92<25,$C88=$C$45),$E$73/12,AND(D92>12,D92<25,$C88=$C$46),$E$74/12,AND(D92>12,D92<25,$C88=$C$47),$E$75/12,AND(D92>12,D92<25,$C88=$C$48),$E$76/12,AND(D92>12,D92<25,$C88=$C$49),$E$77/12,AND(D92>12,D92<25,$C88=$C$50),$E$78/12,AND(D92>24,D92<37,$C88=$C$41),$F$69/12,AND(D92>24,D92<37,$C88=$C$42),$F$70/12,AND(D92>24,D92<37,$C88=$C$43),$F$71/12,AND(D92>24,D92<37,$C88=$C$44),$F$72/12,AND(D92>24,D92<37,$C88=$C$45),$F$73/12,AND(D92>24,D92<37,$C88=$C$46),$F$74/12,AND(D92>24,D92<37,$C88=$C$47),$F$75/12,AND(D92>24,D92<37,$C88=$C$48),$F$76/12,AND(D92>24,D92<37,$C88=$C$49),$F$77/12,AND(D92>24,D92<37,$C88=$C$50),$F$78/12,AND(D92>36,D92<49,$C88=$C$41),$G$69/12,AND(D92>36,D92<49,$C88=$C$42),$G$70/12,AND(D92>36,D92<49,$C88=$C$43),$G$71/12,AND(D92>36,D92<49,$C88=$C$44),$G$72/12,AND(D92>36,D92<49,$C88=$C$45),$G$73/12,AND(D92>36,D92<49,$C88=$C$46),$G$74/12,AND(D92>36,D92<49,$C88=$C$47),$G$75/12,AND(D92>36,D92<49,$C88=$C$48),$G$76/12,AND(D92>36,D92<49,$C88=$C$49),$G$77/12,AND(D92>36,D92<49,$C88=$C$50),$G$78/12,AND(D92>48,D92<61,$C88=$C$41),$H$69/12,AND(D92>48,D92<61,$C88=$C$42),$H$70/12,AND(D92>48,D92<61,$C88=$C$43),$H$71/12,AND(D92>48,D92<61,$C88=$C$44),$H$72/12,AND(D92>48,D92<61,$C88=$C$45),$H$73/12,AND(D92>48,D92<61,$C88=$C$46),$H$74/12,AND(D92>48,D92<61,$C88=$C$47),$H$75/12,AND(D92>48,D92<61,$C88=$C$48),$H$76/12,AND(D92>48,D92<61,$C88=$C$49),$H$77/12,AND(D92>48,D92<61,$C88=$C$50),$H$78/12)
 
Upvote 0
hope anyone can help.

if the month is greater then 0 but equal to or less then 12, and Cell C88 = Cell C41 (the formula needs to check against additional cells up to C50) then divide cell d69 (the formula needs to check against additional cells up to d78) by 12

i am trying to accomplish this for 10-years meaning month 0-12, month 13-24, month 25-36, month 37-48, month 49-60, month61-72, month 73-84, month 85-96, month97-108, month109-120

=IF(AND(D92>0,D92<13,$C88=$C$41),$D$69/12,IF(AND(D92>0,D92<13,$C88=$C$42),$D$70/12,IF(AND(D92>0,D92<13,$C88=$C$43),$D$71/12,IF(AND(D92>0,D92<13,$C88=$C$44),$D$72/12,IF(AND(D92>0,D92<13,$C88=$C$45),$D$73/12,IF(AND(D92>0,D92<13,$C88=$C$46),$D$74/12,IF(AND(D92>0,D92<13,$C88=$C$47),$D$75/12,IF(AND(D92>0,D92<13,$C88=$C$48),$D$76/12,IF(AND(D92>0,D92<13,$C88=$C$49),$D$77/12,IF(AND(D92>0,D92<13,$C88=$C$50),$D$78/12,IF(AND(D92>12,D92<25,$C88=$C$41),$E$69/12,IF(AND(D92>12,D92<25,$C88=$C$42),$E$70/12,IF(AND(D92>12,D92<25,$C88=$C$43),$E$71/12,IF(AND(D92>12,D92<25,$C88=$C$44),$E$72/12,IF(AND(D92>12,D92<25,$C88=$C$45),$E$73/12,IF(AND(D92>12,D92<25,$C88=$C$46),$E$74/12,IF(AND(D92>12,D92<25,$C88=$C$47),$E$75/12,IF(AND(D92>12,D92<25,$C88=$C$48),$E$76/12,IF(AND(D92>12,D92<25,$C88=$C$49),$E$77/12,IF(AND(D92>12,D92<25,$C88=$C$50),$E$78/12,IF(AND(D92>24,D92<37,$C88=$C$41),$F$69/12,IF(AND(D92>24,D92<37,$C88=$C$42),$F$70/12,IF(AND(D92>24,D92<37,$C88=$C$43),$F$71/12,IF(AND(D92>24,D92<37,$C88=$C$44),$F$72/12,IF(AND(D92>24,D92<37,$C88=$C$45),$F$73/12,IF(AND(D92>24,D92<37,$C88=$C$46),$F$74/12,IF(AND(D92>24,D92<37,$C88=$C$47),$F$75/12,IF(AND(D92>24,D92<37,$C88=$C$48),$F$76/12,IF(AND(D92>24,D92<37,$C88=$C$49),$F$77/12,IF(AND(D92>24,D92<37,$C88=$C$50),$F$78/12,IF(AND(D92>36,D92<49,$C88=$C$41),$G$69/12,IF(AND(D92>36,D92<49,$C88=$C$42),$G$70/12,IF(AND(D92>36,D92<49,$C88=$C$43),$G$71/12,IF(AND(D92>36,D92<49,$C88=$C$44),$G$72/12,IF(AND(D92>36,D92<49,$C88=$C$45),$G$73/12,IF(AND(D92>36,D92<49,$C88=$C$46),$G$74/12,IF(AND(D92>36,D92<49,$C88=$C$47),$G$75/12,IF(AND(D92>36,D92<49,$C88=$C$48),$G$76/12,IF(AND(D92>36,D92<49,$C88=$C$49),$G$77/12,IF(AND(D92>36,D92<49,$C88=$C$50),$G$78/12,IF(AND(D92>48,D92<61,$C88=$C$41),$H$69/12,IF(AND(D92>48,D92<61,$C88=$C$42),$H$70/12,IF(AND(D92>48,D92<61,$C88=$C$43),$H$71/12,IF(AND(D92>48,D92<61,$C88=$C$44),$H$72/12,IF(AND(D92>48,D92<61,$C88=$C$45),$H$73/12,IF(AND(D92>48,D92<61,$C88=$C$46),$H$74/12,IF(AND(D92>48,D92<61,$C88=$C$47),$H$75/12,IF(AND(D92>48,D92<61,$C88=$C$48),$H$76/12,IF(AND(D92>48,D92<61,$C88=$C$49),$H$77/12,IF(AND(D92>48,D92<61,$C88=$C$50),$H$78/12))))))))))))))))))))))))))))))))))))))))))))))))))
 

Attachments

  • Screen Shot 2022-10-09 at 11.58.10 PM.jpg
    Screen Shot 2022-10-09 at 11.58.10 PM.jpg
    237.4 KB · Views: 13
Upvote 0
Try and replace that monster formula with this one:

Excel Formula:
=INDEX($D$69:$M$78,MATCH($C$88,$C$41:$C$50,0),CEILING.MATH($D$92/12))/12

Generally, nesting more than five or six IFS should make you think you need a different approach.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,262
Members
449,075
Latest member
staticfluids

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