Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping through Cells
I need to loop through cells B9, B11, B13, B15, B17, B19, B21 (seven total)
and fill each with a date that is located in M4. End the process after the last one B9 = M4-13 B11 = M4-12 B13 = M4 -11 B15 = M4 -10 B17 = M4 -9 B19 = M4 -8 B21 = M4 -7 Any help is appreciated. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping through Cells
Sub AddDates()
Dim cell as Range, j as Long j = 13 for each cell in Range("B9,B11,B13,B15,B17,B19,B21") cell.Value = Range("M4").Value - j cell.Numberformat = "mm/dd/yyyy" j = j - 1 Next End Sub -- Regards, Tom Ogilvy "Bill" wrote in message ... I need to loop through cells B9, B11, B13, B15, B17, B19, B21 (seven total) and fill each with a date that is located in M4. End the process after the last one B9 = M4-13 B11 = M4-12 B13 = M4 -11 B15 = M4 -10 B17 = M4 -9 B19 = M4 -8 B21 = M4 -7 Any help is appreciated. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
reference cells when looping | Excel Discussion (Misc queries) | |||
Looping through cells using VBA | Excel Programming | |||
Faster Way of looping through cells | Excel Programming | |||
Looping on Cells with $x$y | Excel Programming | |||
Looping through Cells | Excel Programming |