Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How to add in increments for multiple cells
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 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How to add in increments for multiple cells
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 "MaggieV" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
need to paste link from 4 vertical cells to 4 horizontal cells? | Excel Discussion (Misc queries) | |||
Merge Cells | Excel Discussion (Misc queries) | |||
extend my formula with increments of 4 cells | Excel Worksheet Functions | |||
Help adding text values | Excel Worksheet Functions | |||
Convert data type of cells to Text,Number,Date and Time | Excel Worksheet Functions |