![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 03:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com