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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert value to string (123="123")

Status
Not open for further replies.

SteveBzzz

Technical User
Aug 24, 2002
14
US
Help...

How do I perfrom a simple operations such as converting a numeric value into string? For example, convert the number 1234 into "1234"? Can I copy a column of numbers and paste it to a new column as text? Text in the same format as the number column? For example, number is 34, formatted number column is 034...desired text = "034"

If not, what about during the import process (text file) can the number be treated as text then?

It's gotta be something really simple right?

Thanks...
 
are you looking for a function to convert the number? Such as
=text(cell_ref,"000")

or you can highlight the range and then go to Format, Cells, Number tab, and select Text
 
xlhelp,

Yes, thank you, you have put me back on track. I tried that before and assumed that it wasn't working. The reason that I thought that it wasn't working is that:

If I have a three digit number for example 123 in a cell. I am able to use that cell both in a math function and in a text function. For example, A1=123, then A1+1=124 and len (A1)=3. Is that normal? That A1 can be used as both a number and a text at the same time?

Thanks,

Steve
 
If excel sees some text that looks like a number, you can still perform some math on it - this'll be what's confusing you. If you are in any doubt, use =ISTEXT(A1) or =ISNUMBER(A1). These will return TRUE or FALSe, dependingon whether the test is true or false (ie isnumber will return TRUE if there is a number in the cell and false if it is text)
Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top