How to add in increments for multiple cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, to keep this question simple.....what I'd like to be able to do is to
create a macro that will add an increment of 1 to the existing number in
multiple selected cells (example: if i have a2, a17, a20, a21, and a40
selected, I want to add 1 to their existing sum - none will have the same
resulting sum).

Thanks!
MaggieV
 
Try:

I created a named range called "Increment" which holds value to be added.
Select cells to adjusted and call macro

Sub Add_Incr()
Dim incr as Double
incr = Range("Increment")
For Each cell In Selection
cell.Value = cell.Value + incr
Next
End Sub

HTH
 
Try:

I created a named range called "Increment" which holds value to be added.
Select cells to adjusted and call macro

Sub Add_Incr()
Dim incr as Double
incr = Range("Increment")
For Each cell In Selection
cell.Value = cell.Value + incr
Next
End Sub

HTH
 

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