Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting number for Substitute Formula

Status
Not open for further replies.

mmm76

Technical User
May 15, 2008
10
US
I am trying to remove the decimal points from a number in excel. I am using this formula - =Substitute(A1,".",""). It seems to work but if my original number is 17.20 the substitute formula removes the last 0. In order for all my numbers to be formatted correctly I need to have that ending 0. I have changed it to text and manually added in the 0 but there are too many lines to go through to add them all in - the chance of error is high and they have to be able to be added together too. Any suggestions?
Thank you!
 


Hi,

my original number is 17.20 the substitute formula removes the last 0

Leading ZEROS and trailing zeros in numbers mean absolutely NOTHING.

AND you are mixing the concept of NUMBERS with the concept of TEXT (by wanting to substitute a BLANK, with a decimal point which is a DISPLAY feature)

Process:

Multiply by 100 and return the INTEGER part...
[tt]
=INT(A1*100)
[/tt]


Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
I'd like to throw in that you should get in the habit of selecting a cell and looking at the Formula bar to see the contents of the cell. What's displayed in the cell itself is controlled by smoke and mirrors and is very, very often misleading.

--Lilliabeth
 
Thank you Skip - appreciate it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top