I use Excel and Smartsheet a lot and make some very complex nested formulas. Because these are written in sheets rather than in any kind of IDE, there is little or no formatting to them for legibility, so I copy them into Notepad++ for debugging or working on them.
I have a user defined language in Notepad++ that works for Excel Formulae, and others for Smartsheet, Google Sheets etc.
I want to use these to fold formula sections up within functions (to quickly narrow down to the section that needs debugging). However, although the fold option works to hide whole lines, this doesn't work within a line so I need a plugin or something that will convert formulas from a long line to split them out per function and argument (indented properly of course!)
I have seen auto-formatters for SQL that do this effectively (I'm a big fan of freeformatter), I'm looking for a way to do it in Notepad++ on different languages.
For example:
Input:
=IF(B2, IF(C2="Yes", "Result 1", "Result 2"), IF(D2>3, "Result4", "Result5"))
Output:
=IF(
B2,
IF(
C2="Yes",
"Result 1",
"Result 2"
),
IF(
D2>3,
"Result4",
"Result5"
)
)