For/Next Text to Columns

  • Thread starter Thread starter prozewski
  • Start date Start date
P

prozewski

I have a worksheet that has 57 columns which have numeric values but they are
being recognized as text instead of numeric values. I know that I can do
TextToColumns on each column to get the values to be recognized as numeric,
but that takes too long. Is there a way to either put the TextToColumns in a
For/Next loop or is there some easier way to have all values on the sheet
that are numeric recognized as numeric?
 
This sometimes works:
Click on an empty cell and use Copy; select all the cells with the problem;
and use Edit | Paste Special with Add specified. The arithmetic operation
often coerces text to number.
best wishes
 
While you could make this into a macro if you want, the code can be run
directly from the Immediate Window... just execute these two lines of code
in the order shown...

Range("A:BE").NumberFormat = "General"
Range("A:BE").Value = Range("A:BE").Value
 
Unfortunately that will not work because then all of the formatting that is
in place disappears. Text To Columns works, but I can't figure out how to do
a loop so that it starts at column A:A and goes through to the last column.
Thanks,
Paul
 
That is awesome! This is just one small thing the macro is doing and it is an
enormous help.
Thank you very much!!!
Paul
 

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