changing value of a range of cells

E

Edward Scott

hi,

I am trying to change the value of an entire range of cells, i.e. cells
A1 to B2 have numbers in them and I want to divide all numbers by 2.

I tried Range("A1:B2").Value = Range("A1:B2").Value / 2

but this always yields a Type Mismatch error. It works if the specified
Range is only 1 cell, but not otherwise.

is there a way to do this other than looping through all the cells in
the range, changing them one at a time?
 

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