loop

  • Thread starter Thread starter LiSa
  • Start date Start date
L

LiSa

Hi

I know you can do a loop for each worksheet in the
workbook, but can you do one for each cell within a range
eg C4:H9
If so, how ?

ty :)
 
Sub Chng()
For Each Cel In Range("C4:H9")
Cel.Value = Cel.Value * 2
Next Cel
End Sub

or

Sub Chng()
Set Rng = Range("C4:H9")
For Each Cel In Rng
Cel.Value = Cel.Value * 2
Next Cel
End Sub

etc
 

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

Back
Top