Round function is giving me error because they are not numbers.

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi

The first 4 values in the sheet below, they look they are numbers (aligned to the right) but Round(number,2) gave me error message. I used Isnumber() and they are not number. I multiple these number by 1 using Copy/PasteSpecial but they are still not number. I highlighted them and Clear Format but still not numbers? What is causing that? Please see the link below to download the file. Thank you very much.



Round.xlsx
ABCD
3 21,072.20#VALUE!FALSE
4 $ 7,902.07#VALUE!FALSE
5 $ 2,634.02#VALUE!FALSE
6 $ 7,902.07#VALUE!FALSE
79219.0853279219.09TRUE
86585.0609486585.06TRUE
96585.0609486585.06TRUE
1044778.4144544778.41TRUE
116585.0609486585.06TRUE
Sheet1
Cell Formulas
RangeFormula
C3:C11C3=ROUND(A3,2)
D3:D11D3=ISNUMBER(A3)
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi Lezawang,

It appears those cells has some non-breaking space characters (decimal 160, hex A0)

You could use this to convert:
Excel Formula:
=IF(ISNUMBER(A3),A3,VALUE(SUBSTITUTE(A3,CHAR(160),"")))
 
Upvote 0
As Toadstool has said, they are non-breaking spaces which you will need to remove. You may also need to get rid of the $ signs depending on your settings.
 
Upvote 0
Thank you all it works now. I have one question please, what made you think there is char(160)? non-breaking space? from just looking at the cell? thanks again
 
Last edited:
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
Thank you all it works now. I have one question please, what made you think there is char(160)? non-breaking space? from just looking at the cell? thanks again
I used the CODE function to check the cell contents. It doesn't work on your XL2BB version but here's the Google Drive download version:

Cell Formulas
RangeFormula
C3:C13C3=ROUND(A3,2)
D3:D13D3=ISNUMBER(A3)
E3:E13E3=IF(ISNUMBER(A3),A3,VALUE(SUBSTITUTE(A3,CHAR(160),"")))
F3:F13F3=CODE(A3)
G3:AR13G3=IFERROR(CODE(MID($A3,COLUMN()-COLUMN($F$3),1)),"")
 
Upvote 0
I have one question please, what made you think there is char(160)? non-breaking space?
They are not uncommon in data files that come from:
- the web
- other applications
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,412
Members
448,959
Latest member
camelliaCase

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top