Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default For/Next Text to Columns

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default For/Next Text to Columns

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
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"prozewski" wrote in message
...
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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default For/Next Text to Columns

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

--
Rick (MVP - Excel)


"prozewski" wrote in message
...
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?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default For/Next Text to Columns

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

"Bernard Liengme" wrote:

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
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"prozewski" wrote in message
...
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?




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default For/Next Text to Columns

That is awesome! This is just one small thing the macro is doing and it is an
enormous help.
Thank you very much!!!
Paul

"Rick Rothstein" wrote:

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

--
Rick (MVP - Excel)


"prozewski" wrote in message
...
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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining Text from 2 Columns into 1 then Deleting the 2 Columns sleepindogg Excel Worksheet Functions 5 September 19th 08 12:36 AM
help with sorting text in columns to match other columns rkat Excel Discussion (Misc queries) 1 August 11th 06 03:42 AM
merge text from 2 columns into 1 then delete the old 2 columns sleepindogg Excel Worksheet Functions 4 March 30th 06 07:25 PM
Linking text columns with text and data columns Edd Excel Worksheet Functions 0 March 17th 05 04:23 PM
extracting text from within a cell - 'text to rows@ equivalent of 'text to columns' Dan E[_2_] Excel Programming 4 July 30th 03 06:43 PM


All times are GMT +1. The time now is 10:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"