number stored as text

A

Atif

Hi,

Using VBA How can I check if number stored as text in cell. I have a long
list, converting whole list is time consuming, I want to identify trouble
cells and change.

Atif
 
R

Rick Rothstein

Select the column with the cells in question and then just execute these two
lines from the Immediate Window (you can bundle them into a macro if you
really want to though)...

Selection.NumberFormat = "General"
Selection.Value = Selection.Value

NOTE: The above code assumes your values are constants and that there are NO
formulas within the selection.
 

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

Top