Forum Discussion
Possible Bug: VBA Debugging Breaks After Selecting a Cell with Nested LAMBDA Functions in Excel 365
Hi everyone,
I believe I’ve encountered a bug in Excel 365 involving the interaction between LAMBDA functions and the VBA compiler.
Issue:
When a user selects the formula text of a cell that contains a LAMBDA function calling two or more other LAMBDAs, Excel displays a tooltip saying:
“This formula can't be previewed due to custom functions.”
Right after this, the VBA compiler stops working properly — step-by-step debugging, breakpoints (Stop, F8, etc.), and other debug features become unresponsive or are ignored entirely.
Steps to Reproduce:
- Create a formula with a nested LAMBDA structure (e.g., one LAMBDA calling others twice).
- Select the formula text inside the formula bar (or directly in the cell).
- Notice the warning tooltip from Excel: "This formula can't be previewed due to custom functions."
- Try debugging any VBA code — you’ll see that debugging no longer works as expected.
The only way I’ve found to restore VBA debugging is to close and reopen Excel.
Questions:
- Has anyone else experienced this issue?
- Is this a known bug, or is there any official workaround?
- Could this be a conflict between the formula parser and the VBA runtime?
Thanks in advance!
3 Replies
- JKPieterseBronze Contributor
It helps if you could share a workbook that reproduces this issue. For starters, once the debugging issue surfaces click Help, Feedback, Report a problem and describe your issue there.
- RichardPelmoreCopper Contributor
I've tested this and have reproduced the behaviour
- JKPieterseBronze Contributor
It would be very helpful if you could share that workbook chaps!