Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9787

How to create a custom number format in Google Sheets that handles single and multiple digit numbers differently

$
0
0

How can I create a custom number format in Google Sheets that displays numbers > -10 and < 10 to one decimal place, but displays numbers <= -10 or >= 10 with no decimal places? The format should apply to both positive and negative numbers. I tried ChatGPT; it suggested 0.0;-0.0;0.0 and also [<-10]0;[>-10]0. but neither worked as desired.

For column A I would like the following criteria:

  1. numbers between but not including -10 to 10 should have one digit after the decimal point (example: 3.2, -2.9, 0.6, 9.9)
  2. numbers starting with 0 should also have one digit after the decimal point
  3. numbers with two or more digits should have no decimal point. (example: 10, 125, -5420)

Viewing all articles
Browse latest Browse all 9787

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>