View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default Remove space in front of number in a cell?

=VALUE(TRIM(SUBSTITUTE(RIGHT(A1,LEN(A1)-1),",","")))
returns the pure number.

Regards,
Stefi

€˛Barcelona€¯ ezt Ć*rta:

I have a column of values I wish to sum. However, the data was imported from
a database and is entered as text - e.g $,100,000

I have removed the $ (=RIGHT) sign and the , (=SUBSTITUTE) but have now
found that there is a space in front of the number.

Is there a simple way to remove the space? I have used REPLACE but this does
not work. I have used =RIGHT but this removes the next number not the space.

Any suggestions?

 
ExcelBanter Database Error
Database Error Database error
The ExcelBanter database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.excelbanter.com home page, then try to open another page.
  • Click the Back button to try another link.
The www.excelbanter.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.