Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Formula to convert a number with spaces to just a number?

We import GL data in a CSV file and it gives year to data balances. The
problem is the number has spaces where a comma should be. For instance,
1,700,000.02 is in as 1 700 000.02 If the number is in the thousands there
are two spaces in front of the first digit, in the millions one digit. If
the number is less than a thousand than it reads as a number. Is there a
formula to remove the space(s) so Excel recognizes it as a number?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Formula to convert a number with spaces to just a number?

Try this in B1:

=--SUBSTITUTE(A1," ","")

assuming your "number" is in A1.

Hope this helps.

Pete


On Dec 16, 12:16*am, WolfgangPD
wrote:
We import GL data in a CSV file and it gives year to data balances. *The
problem is the number has spaces where a comma should be. *For instance,
1,700,000.02 is in as 1 700 000.02 *If the number is in the thousands there
are two spaces in front of the first digit, in the millions one digit. *If
the number is less than a thousand than it reads as a number. *Is there a
formula to remove the space(s) so Excel recognizes it as a number?


  #3   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Formula to convert a number with spaces to just a number?

Try in B1, copied down: =SUBSTITUTE(A1," ","")+0
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---
"WolfgangPD" wrote:
We import GL data in a CSV file and it gives year to data balances. The
problem is the number has spaces where a comma should be. For instance,
1,700,000.02 is in as 1 700 000.02 If the number is in the thousands there
are two spaces in front of the first digit, in the millions one digit. If
the number is less than a thousand than it reads as a number. Is there a
formula to remove the space(s) so Excel recognizes it as a number?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default Formula to convert a number with spaces to just a number?

If you have your 'numbers' in Col A then you can enter this in any Col
starting at row 1 (if you don't have header rows)

=SUBSTITUTE(K3," ","")*1

Copy this down

First you use Substitute to replace spaces (" ") with nothing ("") then
multiply with 1 to convert to number

"WolfgangPD" wrote:

We import GL data in a CSV file and it gives year to data balances. The
problem is the number has spaces where a comma should be. For instance,
1,700,000.02 is in as 1 700 000.02 If the number is in the thousands there
are two spaces in front of the first digit, in the millions one digit. If
the number is less than a thousand than it reads as a number. Is there a
formula to remove the space(s) so Excel recognizes it as a number?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Formula to convert a number with spaces to just a number?

Thank you very much! Adding the zero turned it into a number instead of
text. This is perfect!

"Max" wrote:

Try in B1, copied down: =SUBSTITUTE(A1," ","")+0
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---
"WolfgangPD" wrote:
We import GL data in a CSV file and it gives year to data balances. The
problem is the number has spaces where a comma should be. For instance,
1,700,000.02 is in as 1 700 000.02 If the number is in the thousands there
are two spaces in front of the first digit, in the millions one digit. If
the number is less than a thousand than it reads as a number. Is there a
formula to remove the space(s) so Excel recognizes it as a number?



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Formula to convert a number with spaces to just a number?

Thanks Pete.

"Pete_UK" wrote:

Try this in B1:

=--SUBSTITUTE(A1," ","")

assuming your "number" is in A1.

Hope this helps.

Pete


On Dec 16, 12:16 am, WolfgangPD
wrote:
We import GL data in a CSV file and it gives year to data balances. The
problem is the number has spaces where a comma should be. For instance,
1,700,000.02 is in as 1 700 000.02 If the number is in the thousands there
are two spaces in front of the first digit, in the millions one digit. If
the number is less than a thousand than it reads as a number. Is there a
formula to remove the space(s) so Excel recognizes it as a number?



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Formula to convert a number with spaces to just a number?

On Mon, 15 Dec 2008 16:16:00 -0800, WolfgangPD
wrote:

We import GL data in a CSV file and it gives year to data balances. The
problem is the number has spaces where a comma should be. For instance,
1,700,000.02 is in as 1 700 000.02 If the number is in the thousands there
are two spaces in front of the first digit, in the millions one digit. If
the number is less than a thousand than it reads as a number. Is there a
formula to remove the space(s) so Excel recognizes it as a number?


=substitute(a1," ","")

--ron
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Formula to convert a number with spaces to just a number?

You're welcome.

The -- converts the text value to a number, but you can use +0 or *1
instead.

Pete

On Dec 16, 12:35*am, WolfgangPD
wrote:
Thanks Pete. *



"Pete_UK" wrote:
Try this in B1:


=--SUBSTITUTE(A1," ","")


assuming your "number" is in A1.


Hope this helps.


Pete


On Dec 16, 12:16 am, WolfgangPD
wrote:
We import GL data in a CSV file and it gives year to data balances. *The
problem is the number has spaces where a comma should be. *For instance,
1,700,000.02 is in as 1 700 000.02 *If the number is in the thousands there
are two spaces in front of the first digit, in the millions one digit.. *If
the number is less than a thousand than it reads as a number. *Is there a
formula to remove the space(s) so Excel recognizes it as a number?- Hide quoted text -


- Show quoted text -


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Formula to convert a number with spaces to just a number?

Didn't you notice that Pete's formula accomplishes exactly the same result
by using the unary!
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"WolfgangPD" wrote in message
...
Thank you very much! Adding the zero turned it into a number instead of
text. This is perfect!

"Max" wrote:

Try in B1, copied down: =SUBSTITUTE(A1," ","")+0
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---
"WolfgangPD" wrote:
We import GL data in a CSV file and it gives year to data balances.
The
problem is the number has spaces where a comma should be. For
instance,
1,700,000.02 is in as 1 700 000.02 If the number is in the thousands
there
are two spaces in front of the first digit, in the millions one digit.
If
the number is less than a thousand than it reads as a number. Is there
a
formula to remove the space(s) so Excel recognizes it as a number?



  #10   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Formula to convert a number with spaces to just a number?

Glad it worked. Pl press the YES button in my response, won't you. Think you
missed doing that.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---
"WolfgangPD" wrote:
Thank you very much! Adding the zero turned it into a number instead of
text. This is perfect!




  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Formula to convert a number with spaces to just a number?

Select the range of cells in question
Goto the menu EditReplace
Find what: enter a space by pressing the space bar
Replace with: nothing, leave this blank
Replace All

--
Biff
Microsoft Excel MVP


"WolfgangPD" wrote in message
...
We import GL data in a CSV file and it gives year to data balances. The
problem is the number has spaces where a comma should be. For instance,
1,700,000.02 is in as 1 700 000.02 If the number is in the thousands
there
are two spaces in front of the first digit, in the millions one digit. If
the number is less than a thousand than it reads as a number. Is there a
formula to remove the space(s) so Excel recognizes it as a number?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I convert the result of a formula to a whole number? crystal Excel Discussion (Misc queries) 1 April 28th 06 07:06 AM
how do I convert a number to number of years, months and days because Excel Worksheet Functions 2 October 12th 05 06:15 PM
How do I convert time (2:30) to a number (2.5) in a formula? tammyj Excel Worksheet Functions 1 August 25th 05 04:46 PM
convert text-format number to number in excel 2000%3f Larry Excel Discussion (Misc queries) 1 July 29th 05 08:18 PM
not able to convert text, or graphic number to regular number in e knutsenk Excel Worksheet Functions 1 April 2nd 05 08:41 AM


All times are GMT +1. The time now is 03:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"