HELP: Performing multiple cell changes in a range - converting text to numeric

C

Clinton M James

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
 
G

Gary''s Student

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.
 
D

Dave Peterson

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.
 

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

Top