Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 989
Default Removing number spacing in cells

Basically I am making a calculator that will parse number changes. In order
to do the math operations correctly I must convert my initial input to
standard number format first.

4 500 --- 4500
23 345 -- 23345

I would like to do this with a new cell that calls upon the value in the old
and converts it.

So for example in A1 I have 4 500
and in B1 I want to have 4500 without manually removing the space.

I've looked online and found the val function and tried it but it does not
work for some reason. I tried to enable VBA but it seems it still does not
work.

I try Val(A1) and the cell gives me a #NAME? error.

Does anybody have any ideas of a differant function I can use to remove the
spacing or a way to get the Val function working?



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Removing number spacing in cells

=VALUE(SUBSTITUTE(A1," ",""))
=VAL(SUBSTITUTE(A1," ",""))
"Mark" wrote:

Basically I am making a calculator that will parse number changes. In order
to do the math operations correctly I must convert my initial input to
standard number format first.

4 500 --- 4500
23 345 -- 23345

I would like to do this with a new cell that calls upon the value in the old
and converts it.

So for example in A1 I have 4 500
and in B1 I want to have 4500 without manually removing the space.

I've looked online and found the val function and tried it but it does not
work for some reason. I tried to enable VBA but it seems it still does not
work.

I try Val(A1) and the cell gives me a #NAME? error.

Does anybody have any ideas of a differant function I can use to remove the
spacing or a way to get the Val function working?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Removing number spacing in cells

=val(SUBSTITUTE(A1," ",""))





"Mark" wrote:

Basically I am making a calculator that will parse number changes. In order
to do the math operations correctly I must convert my initial input to
standard number format first.

4 500 --- 4500
23 345 -- 23345

I would like to do this with a new cell that calls upon the value in the old
and converts it.

So for example in A1 I have 4 500
and in B1 I want to have 4500 without manually removing the space.

I've looked online and found the val function and tried it but it does not
work for some reason. I tried to enable VBA but it seems it still does not
work.

I try Val(A1) and the cell gives me a #NAME? error.

Does anybody have any ideas of a differant function I can use to remove the
spacing or a way to get the Val function working?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default Removing number spacing in cells

There is no worksheet VAL function, but there is a VALUE function (as Mike
showed in his post); however, this will save a few characters over using it
(and it avoids the function as well)...

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

--
Rick (MVP - Excel)


"Mark" wrote in message
...
Basically I am making a calculator that will parse number changes. In
order
to do the math operations correctly I must convert my initial input to
standard number format first.

4 500 --- 4500
23 345 -- 23345

I would like to do this with a new cell that calls upon the value in the
old
and converts it.

So for example in A1 I have 4 500
and in B1 I want to have 4500 without manually removing the space.

I've looked online and found the val function and tried it but it does not
work for some reason. I tried to enable VBA but it seems it still does
not
work.

I try Val(A1) and the cell gives me a #NAME? error.

Does anybody have any ideas of a differant function I can use to remove
the
spacing or a way to get the Val function working?




  #5   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Removing number spacing in cells

"Add a zero" or "Multiply by 1" would be alternative ways
to coerce the resulting text nums returned by SUBSTITUTE
to real numbers w/o impacting intrinsic values, eg:
=SUBSTITUTE(A1," ","")+0
=SUBSTITUTE(A1," ","")*1
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:370 Subscribers:66
xdemechanik
---
"Mark" wrote:
Basically I am making a calculator that will parse number changes. In order
to do the math operations correctly I must convert my initial input to
standard number format first.

4 500 --- 4500
23 345 -- 23345

I would like to do this with a new cell that calls upon the value in the old
and converts it.

So for example in A1 I have 4 500
and in B1 I want to have 4500 without manually removing the space.

I've looked online and found the val function and tried it but it does not
work for some reason. I tried to enable VBA but it seems it still does not
work.

I try Val(A1) and the cell gives me a #NAME? error.

Does anybody have any ideas of a differant function I can use to remove the
spacing or a way to get the Val function working?



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
Change line spacing of text in Excel cells Jo Excel Discussion (Misc queries) 5 July 17th 07 05:23 PM
removing dashes changes test into number DanM Excel Discussion (Misc queries) 3 September 21st 06 03:06 AM
Spacing in cells is preventing addition kris Excel Worksheet Functions 4 September 9th 06 06:40 PM
keep number when removing formula Cindy B Excel Discussion (Misc queries) 2 March 1st 06 06:30 PM
help with removing digits from a number frank Excel Discussion (Misc queries) 4 July 12th 05 02:31 AM


All times are GMT +1. The time now is 02:01 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"