Google Sheets Formula Beautifier

This utility allows you to explore complex or very long Google Sheets formulas by fully expanding them across multiple lines and indenting them.


Example

Before:

=LET(range,A2:A59,MAP(range,SEQUENCE(ROWS(range)),LAMBDA(test,i,COUNTIF(ARRAY_CONSTRAIN(range,i,1),test))))

After:

=LET(
    range,
    A2:A59,
    MAP(
        range,
        SEQUENCE(
            ROWS(
                range
            )
        ),
        LAMBDA(
            test,
            i,
            COUNTIF(
                ARRAY_CONSTRAIN(
                    range,
                    i,
                    1
                ),
                test
            )
        )
    )
)

Copy the formula here: