Formatting problem

  • Thread starter Thread starter Marc
  • Start date Start date
M

Marc

In my excel sheet there is a General formatted column
When entering numbers in to the column it stores as numbers with aligning
right side
Then I format the entire column as text, after that all values are left
aligned
Then I entered a new value in to the column, it stores with green colour
hyphen
Previously entered values are not like that. If I edit the previously
entered value then that value also stores with green colour hyphen.
What is the reason for this and how to avoid this
Please Help
 
Marc,

This is Excel telling you that you have numbers stored as text. To get rid
of the green triangle:-

Tools|Options - Error Checking tab - Un-check 'numbers stored as text'

Mike
 
Thanks Mike
But the problem is already there


Mike H said:
Marc,

This is Excel telling you that you have numbers stored as text. To get rid
of the green triangle:-

Tools|Options - Error Checking tab - Un-check 'numbers stored as text'

Mike
 
To fix existing cells, selec them and run:

Sub marc()
For Each r In Selection
With r
.NumberFormat = "General"
.Value = .Value
End With
Next
End Sub
 
Thanks Gary
But my entire column is formatted as Text
According to your code it is formatted in to General
I want to keep the column in Text format and make every cell value in to
text
 
When you select a cell with a green arrow you can use the mouse to highlight
a dropdown box. Among the options are Ignore this error (numbers stored as
text). When you click ignore the arrows will disapear. save the file and when
you reopen there will be no more error messages.

Peter Atherton
 
A one line change!

Sub marc()
For Each r In Selection
With r
.NumberFormat = "@"
.Value = .Value
End With
Next
End Sub
 

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