Show trailing zero after round function

I'm trying to round numbers on excel based on a range. If the number is < 10 and > 0.5, I want it to round to one decimal place. When the number is 0.968, it rounds to 1. It does not show the zero after the decimal. How do I change the formula so that it shows the zero (i.e. 1.0)?

Edit: If the number is <0.5, I want it to to round and show 2 decimal places. Formatting the cells to show only one decimal place would prevent me from seeing the 2nd decimal place.

=IF(B11>=10, ROUND(B11,0), IF(AND(B11<10, B11>0.5), ROUND(B11,1), IF(B11<=0.5,ROUND(B11,2))))

It IS possible to change the formula to display as you ask for. However, in doing so, you end up with a text string that looks like what you want, but as a text string is not a number.

That itself is actually not a problem for many things Excel could further use the value for. Anything you ask Excel to use the text string for in which Excel can see that you cannot logically mean to use it as text but rather as a number, Excel will do so: it will take the text string that could be treated as a number and treat it... as a number. So to that extent, you won't have created a problem for yourself.

But there are many uses in which Excel realizes you might want to use it as the string you created, or as a number, or... well, it can't pick between the two. And so it considers that you made it a string and therefore you must want it to be a string. Lookups are a good example of this. Perhaps you use a lookup using the string and you KNOW the value is in the lookup data, but Excel reports an error. That's because the lookup data version is formatted as a number, but your lookup value is text. So there's no match as Excel honors your choices.

So how to do that? Use the TEXT() function to wrap any portion of the formula that you want this done with, or, if you wish ANY output from it to be treated so, just wrap the whole formula you have with the it. That last might look like this:

=TEXT(IF(B11>=10, ROUND(B11,0), IF(AND(B11<10, B11>0.5), ROUND(B11,1), IF(B11<=0.5,ROUND(B11,0)))),"0.0")

The part at the end is the format you want to use to show a single decimal place even if that place is a 0.

Here's the likely real solution to this problem though. LIKELY, you actually want the output to stay as a number, not become a string. Yet you want a particular format. Excel provides a way to do that.

Bring up the formatting dialog. Choose the number formatting tab. At the bottom of the list of formatting categories is the category "Custom": choose that one.

You can then enter the format you desire. It would be the same format I showed above for the TEXT() function: 0.0.

Do that and you keep the output as a pure number making further use of the result simpler for you. Yet you have the format you desire. Win-win.


You may only need to set the cell format to Number and the Decimal places to 1.

enter image description here



Update:
Since the particularity of rounding 0.968, I set the format of the part <10 and >0.5 to "0.0".

=IF(B11<0.5,ROUND(B11,2),IF(B11>=10,ROUND(B11,0),TEXT(B11,"0.0")))

enter image description here