How to Spill a nested IF equation

PrettyGood_Not Great

Board Regular
Joined
Nov 24, 2023
Messages
95
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have the following algorithm comprised of mostly nested IF. I am struggling to upgrade this to a 365 solution that will allow the equation to spill.

=IF($D11>=FcstMonth,IF(O$10>=$D11,IF(O$10<=$E11,$F11*O$9/SUM(XLOOKUP($D11,$O$10:$BF$10,$O$9#):XLOOKUP($E11,$O$10:$BF$10,$O$9#)),""),""),IF(O$10>=FcstMonth,IF(O$10<=$E11,$F11*O$9/SUM(XLOOKUP(FcstMonth,$O$10:$BF$10,$O$9#):XLOOKUP($E11,$O$10:$BF$10,$O$9#)))))

I don't expect anyone to come back with a working example to this puppy, just looking for any known approaches to handling the series of nested if. When I set all of the vertical references to spill (i.e. $D11# etc), I get a #VALUE.
 
If they are named ranges, then that is the reason. Try it like
Excel Formula:
=BYROW(D11:F24,LAMBDA(br,IF(INDEX(br,,1)>=FcstMonth,IF(O$10>=INDEX(br,,1),IF(O$10<=INDEX(br,,2),INDEX(br,,3)*O$9/SUM(XLOOKUP(INDEX(br,,1),$O$10:$BF$10,$O$9#):XLOOKUP(INDEX(br,,2),$O$10:$BF$10,$O$9#)),""),""),IF(O$10>=FcstMonth,IF(O$10<=INDEX(br,,2),INDEX(br,,3)*O$9/SUM(XLOOKUP(FcstMonth,$O$10:$BF$10,$O$9#):XLOOKUP(INDEX(br,,2),$O$10:$BF$10,$O$9#)))))))
That's It! Stone cold, thanks so much!
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,205
Members
452,618
Latest member
Tam84

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