Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
converting text cell to numeric cell | Excel Discussion (Misc queries) | |||
Converting time from text to numeric | Excel Worksheet Functions | |||
Converting Numeric values to Text | Excel Worksheet Functions | |||
Converting Text into a Numeric Value and Totalling | Excel Worksheet Functions | |||
Converting Text to Numeric | Excel Programming |