Forum Discussion

matthewsb419's avatar
matthewsb419
New Contributor II
1 year ago
Solved

Cheat sheet for Formatting Syntax

Hi,

Can someone point me to a syntax cheat sheet for formatting cube views and reports in Excel?

I'm trying to get this number to show in thousands and have my negative numbers be in red with parentheses, and I'm super close, but I have this odd space at the end I can't seem to solve.  ChatGPT got me here: 

ExcelNumberFormat = [#,##0,_);[Red](#,##0,_))]

But it's stuck there. 

  • MarcusH's avatar
    MarcusH
    1 year ago

    I just played around with the format in Excel itself so any online resource for custom formatting of numbers will help. Have a look at this:

    https://cheatography.com/nqramjets/cheat-sheets/excel-cell-number-formatting/pdf/

     

4 Replies

  • MarcusH's avatar
    MarcusH
    Valued Contributor

    Try this:

    ExcelNumberFormat = [#,##0,;[Red](#,##0,)]

    • matthewsb419's avatar
      matthewsb419
      New Contributor II

      Hi Marcus,

      Thanks for this suggestion, is there somewhere I can learn this? I'd love to be able to understand how this syntax solved my problems versus the earlier two versions I tried.  I'm trying to learn :)

      • MarcusH's avatar
        MarcusH
        Valued Contributor

        I just played around with the format in Excel itself so any online resource for custom formatting of numbers will help. Have a look at this:

        https://cheatography.com/nqramjets/cheat-sheets/excel-cell-number-formatting/pdf/