Convert column of numbers to text.

  • Thread starter Thread starter George
  • Start date Start date
G

George

I have an excel file that was sent to me from another
company.
The data that I need has been defined as a number.

123
123.5
777
888.90 <<<<<<<<<
321.8

The logic I need is against the entire column

When I try to change the cell to text the results become:
888.9
I lose the zero at the end.

Using Text(XX,'0.00') causes the entire column to get .YY
on each record. These are product codes that can not
change.

I have tried to concat, left, right with no luck.

Do you know how to convert this Column from number to
text and keep the last zero?
I still need the other text (Numbers) to remain the same.
 
Do you know how to ...

No George, I don't. If it can be done, someone will enlighten us shortly.

In the meantime, if you have Word, you could copy to & from as unformatted
text.

HTH,
Andy
 
They're numbers each with their own formatting?

If yes, you could use a macro to convert them to text:

Option Explicit
Sub testme()

Dim myCell As Range
Dim myRng As Range

Set myRng = Nothing
On Error Resume Next
Set myRng = Selection.Cells.SpecialCells(xlCellTypeConstants, xlNumbers)
On Error GoTo 0

If myRng Is Nothing Then
MsgBox "no text numbers found"
Exit Sub
End If

For Each myCell In myRng.Cells
With myCell
.Value = "'" & .Text
End With
Next myCell

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

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