Quantcast
Channel: Active questions tagged worksheet-function - Super User
Viewing all articles
Browse latest Browse all 1018

I cannot make the formula spill dynamically in 2D

$
0
0

I need some fresh pair of eyes to look at the following Excel formula. I've got the following formula, where I cannot seem to make it spill down dynamically. The formula currently spills to the right correctly. If I change B5 and C5 to B5# and C5#, the formula does spill down (and to the right) correctly, but the values are incorrect. Can someone help me? Below is the formula. Note that B5# and C5# spill down the same exact number of rows with 1 column each and D$1# and D$2 spill to the right the same exact number of columns with 1 row each. I would appreciate your help. Thanks.

=LET(deviceInstall, B5,deviceRemoval, C5,tcoStartDate, 'Deal Information'!B$6,tcoEndDate, 'Deal Information'!B$7,tcoStart, D$1#,tcoEnd, D$2#,installMonthsFrac, MAP(tcoEnd, LAMBDA(end,    TRUNC(YEARFRAC(deviceInstall, end) * 12) +    IF((DAYS(EOMONTH(deviceInstall, 0), deviceInstall) + 1) / DAY(EOMONTH(deviceInstall, 0)) = 1,        0,        (DAYS(EOMONTH(deviceInstall, 0), deviceInstall) + 1) / DAY(EOMONTH(deviceInstall, 0))    ))),removalMonthsFrac, MAP(tcoStart, LAMBDA(start,    TRUNC(YEARFRAC(start, MIN(deviceRemoval, tcoEndDate)) * 12) +   IF(DAY(MIN(deviceRemoval, tcoEndDate) - 1) / DAY(EOMONTH(MIN(deviceRemoval, tcoEndDate), 0))=1,      0,DAY(MIN(deviceRemoval, tcoEndDate) - 1) / DAY(EOMONTH(MIN(deviceRemoval, tcoEndDate), 0))))),IF(    deviceInstall >= tcoStart,    IF(deviceInstall < tcoEnd,        installMonthsFrac,        0    ),    IF(        deviceRemoval < tcoEnd,        IF(deviceRemoval >= tcoStart,            removalMonthsFrac,            0        ),        IF(removalMonthsFrac < 12,            removalMonthsFrac,            12        )    ))

)

Here is a mock table as was requested by one of the users. The above formula is in cell D5 and it should spill to the right and down.

BCDEFGHI
101-Jul-2401-Jul-2501-Jul-2601-Jul-2701-Jul-2801-Jul-29
201-Jul-2501-Jul-2601-Jul-2701-Jul-2801-Jul-2901-Jan-30
501-Nov-2429-Oct-298.00012.00012.00012.00012.0003.903
601-Oct-2429-Oct-299.00012.00012.00012.00012.0003.903
701-Oct-2429-Oct-299.00012.00012.00012.00012.0003.903

Viewing all articles
Browse latest Browse all 1018

Latest Images

Trending Articles



Latest Images