text to number

  • Thread starter Thread starter DMc2005
  • Start date Start date
D

DMc2005

Hi

i know there is a function to covert a number to text, si there a function
to convert text to a number.

D
 
Say you have a column of numbers that are in text format. In an-unused cell
put 1.

Copy the cell and paste/special with multiply checked over the range of
cells you want to convert.
 
Hi David,
If you mean like in check protection with wording like
Fourteen Dollars and Ninety-Eight Cents
see links at
Numbers to words (as in check protection wording) (#numberstowords)
http://www.mvps.org/dmcritchie/excel/strings.htm#numberstowords
nothing to convert those words back to numbers.

If you mean text that looks like numbers but is text and probably left
aligned. Then you want to change the format to number or general
and then you can run a macro like TrimALL which will reenter the
values stripping any leading and trailing spaces after converting
the nonbreaking space character Char(160) to spaces Char(20).
To convert to text instead, format the cells as text then run the TrimALL
macro. http://www.mvps.org/dmcritchie/excel/join.htm#trimall

Instead of running a macro, if you don't have unprintable characters
and don't want to run a macro -- though since you posted to programming
would assume either solution is fine. You could copy an empty cell
and add that to the column of cells via Ctrl+G (Edit, GoTo), then
the Special Button, then add. To convert to text after formatting as
text do the same add empty cell.

Suggest you test on a copy of the worksheet as your data will be changed.
If dates are involved you will certainly have to test what you are doing.

If none of the above then you will certainly have to provide an example
of what you are talking about.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top