Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default HELP: Performing multiple cell changes in a range - converting text to numeric

Hi All,

I wish to apply a =cint() vba command to a range of cells in one column
without having to loop through each cell as this takes time. Is there any
easy way to do this? I tried to do a range().value = cint(range().value) but
this didn't work and neither did many other things I tried

Problem is i dump data into a sheet from a database query and excel thinks
the numbers are text - formating them to number will not work, only going
through and converting the values will, hence my need to have a fast way of
powering through many lines in one go than going through one by one in a
loop.

Help is appreciated and i extend my thank you in advance.

Regards,
Clint

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default HELP: Performing multiple cell changes in a range - converting tex

You are trying to solve the wrong problem.

Structure the query so excel accepts the values as numbers rather than Text.
Thus the problem is avoided, rather than required to be fixed.
--
Gary''s Student - gsnu2007k


"Clinton M James" wrote:

Hi All,

I wish to apply a =cint() vba command to a range of cells in one column
without having to loop through each cell as this takes time. Is there any
easy way to do this? I tried to do a range().value = cint(range().value) but
this didn't work and neither did many other things I tried

Problem is i dump data into a sheet from a database query and excel thinks
the numbers are text - formating them to number will not work, only going
through and converting the values will, hence my need to have a fast way of
powering through many lines in one go than going through one by one in a
loop.

Help is appreciated and i extend my thank you in advance.

Regards,
Clint


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default HELP: Performing multiple cell changes in a range - converting textto numeric

Try selecting an empty cell.
Edit|Copy
Select your range of offending text numbers.
Edit|Paste special|select Values and Add.

This won't make your values integers, but will convert the text numbers to
number numbers.

If you need a macro, you can record one when you do it manually.

Clinton M James wrote:

Hi All,

I wish to apply a =cint() vba command to a range of cells in one column
without having to loop through each cell as this takes time. Is there any
easy way to do this? I tried to do a range().value = cint(range().value) but
this didn't work and neither did many other things I tried

Problem is i dump data into a sheet from a database query and excel thinks
the numbers are text - formating them to number will not work, only going
through and converting the values will, hence my need to have a fast way of
powering through many lines in one go than going through one by one in a
loop.

Help is appreciated and i extend my thank you in advance.

Regards,
Clint


--

Dave Peterson
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
converting text cell to numeric cell SM Excel Discussion (Misc queries) 5 August 11th 09 03:32 PM
Converting time from text to numeric Eric Wixom[_2_] Excel Worksheet Functions 4 March 21st 08 06:56 PM
Converting Numeric values to Text shail Excel Worksheet Functions 2 September 5th 06 04:50 PM
Converting Text into a Numeric Value and Totalling Shazbut Excel Worksheet Functions 1 May 10th 05 05:14 PM
Converting Text to Numeric Matt Excel Programming 2 January 23rd 04 02:58 AM


All times are GMT +1. The time now is 05:38 PM.

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"