0

I am working with several large Excel spreadsheets with values frequently into the 10s of millions, so quickly comparing numbers by eye can be tricky. To help, I often format cells with 1,000 separators. However, the 'comma style' button in the number group on the home tab of the ribbon (pictured below) automatically formats numbers to 2 decimal places - even if the original number was an integer. These extra decimal places then widen my columns, so I have to click 'decrease decimal' twice, then adjust column widths manually to get the formatting back as I'd like it. This is quite a lot of work!

Screenshot of Excel's 'comma style' button in the number group of the home tab of the ribbon

Is there a way to change the default behaviour of the 'comma style' button so it preserves the number of decimal places that each cell initially had? Thank you.

1 Answer 1

0

There is not. I deal with that so frequently in my job as a financial systems developer that it's basically just a natural reaction now that I click the decrease/increase decimal buttons after clicking the Comma Style button.

You could write a macro to do it and assign that action to a ribbon button.

4
  • Thank you. It's frustrating, but good to know I'm not the only one with this problem! I'm no expert on macros, but will have a look into it, and post here if I find a solution.
    – whv20
    Commented Aug 25, 2023 at 19:54
  • 1
    In newer Excel versions, look for the Cell Styles button (Styles tab) or the Styles gallery (shown if there is space on the ribbon). It should contain a style marked as Comma [0]
    – Paul
    Commented Aug 29, 2023 at 11:32
  • @Paul That particular style, while adding the commas, completely hides the decimals. Desire is to preserver the original number of decimal places.
    – squillman
    Commented Aug 29, 2023 at 13:20
  • @whv20 Paul has a good point. You -could- create new styles in order to work around this. You would have to create a different style for each number of decimals you would want to maintain, though.
    – squillman
    Commented Aug 29, 2023 at 13:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .