Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excel Labs blank screen when selecting a cell with complex formula #24

Open
christianLarney opened this issue Mar 7, 2024 · 7 comments

Comments

@christianLarney
Copy link

A (rather lengthy) formula, using multiple levels of LET, LAMBDA, TAKE, XMATCH, MAP and a few others, causes Excel labs tab to go blank when I click on the cell. When I attach a debugger, I see the error below. The formula continues to evaluate correctly, but no longer displays in Excel Labs. I have Excel Version 2402 (Build 17328.20162) and Excel Labs 1.3.0.0
 
image

@christianLarney
Copy link
Author

Oh, the formula debugger really doesn't like my work. It previously complained my formula was too complicated, but now just won't work at all. If I disable the formula debugger before selecting the cell the issue goes away.

@jack-williams
Copy link
Contributor

@NWilson

@NWilson
Copy link

NWilson commented Mar 11, 2024

Hi Christian, I'm sorry the debugger isn't working for your formula. Are you able to share what the contents of the formula, to help us troubleshoot the issue?

@NWilson
Copy link

NWilson commented May 13, 2024

@christianLarney Hello! Are you able to share the formula that's causing problems? I'd like to be able to reproduce & fix this.

@christianLarney
Copy link
Author

Hi Nicholas, Apologies for the slow response. Are you able to work with the formulae in isolation? Below are two variations that are causing problems. Let me know if you need the surrounding worksheet for context and I'll see if I can reduce it to a version I can make public. Thanks, Christian.

=LET(
fundMonthsHistory, $G$8,
statisticMonthsDuration, BO$2,
refDate, $G$2,
IF(
OR(
fundMonthsHistory < statisticMonthsDuration,
AND(fundMonthsHistory = statisticMonthsDuration, DAY(refDate) = 1)
),
"",
LET(
usedExcessReturnTargets, LET(
totalMonthsCount, $G$3,
finalMonthProportion, $AO$14,
excessReturnTargets, LET(
fundBenchmarkTitles, $M$20:$AD$20,
allFundBenchmarks, TAKE($M$23:$AD$500, totalMonthsCount),
benchInd, XMATCH(Portfolio, fundBenchmarkTitles),
TAKE(CHOOSECOLS(allFundBenchmarks, benchInd + 1), -statisticMonthsDuration)
),
monthlyExcessReturnTargets, ((1 + excessReturnTargets) ^ (1 / 12)) - 1,
withFinalMonthAdjustment, IF(
statisticMonthsDuration = 1,
monthlyExcessReturnTargets * finalMonthProportion,
VSTACK(
DROP(monthlyExcessReturnTargets, -1),
TAKE(monthlyExcessReturnTargets, -1) * finalMonthProportion
)
),
withFinalMonthAdjustment
),
excessReturnTarget, PRODUCT(1 + usedExcessReturnTargets) - 1,
excessReturnTarget
)
)
)

=LET(
fundMonthsHistory, $G$8,
statisticMonthsDuration, BO$2,
refDate, $G$2,
IF(
OR(
fundMonthsHistory < statisticMonthsDuration,
AND(fundMonthsHistory = statisticMonthsDuration, DAY(refDate) = 1)
),
"",
LET(
usedBenchmarkReturns, LET(
totalMonthsCount, $G$3,
benchmarkTitles, LET(
fundBenchmarkTitles, $M$20:$AD$20,
allFundBenchmarks, TAKE($M$23:$AD$500, totalMonthsCount),
benchInd, XMATCH(Portfolio, fundBenchmarkTitles),
TAKE(CHOOSECOLS(allFundBenchmarks, benchInd), -statisticMonthsDuration)
),
benchmarkReturnHeadings, $AN$21:$AT$21,
benchmarkColInd, MAP(benchmarkTitles, LAMBDA(t, XMATCH(t, benchmarkReturnHeadings))),
allBenchmarkReturns, TAKE($AN$23:$AT$500, totalMonthsCount),
statisticBenchmarkReturns, TAKE(allBenchmarkReturns, -statisticMonthsDuration),
MAP(
SEQUENCE(statisticMonthsDuration),
benchmarkColInd,
LAMBDA(r, c, INDEX(statisticBenchmarkReturns, r, c))
)
),
benchmarkReturn, PRODUCT(1 + usedBenchmarkReturns) - 1,
benchmarkReturn
)
)
)

@jack-williams
Copy link
Contributor

Second one repro'd for me when trying to open the debugger - assertion failure

@NWilson
Copy link

NWilson commented May 14, 2024

@christianLarney Thank you ever so much! Yes, I can reproduce the issue now. I would expect this to be fixed in a future release of Labs.

We are sorry it has taken so long to discover and act on the bug, and for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants