Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
generate Odd row numbers in VBA
I want to add cells with odd row numbers in a column.
How can I generate odd row numbers in VBA? -- Rasoul Khoshravan Azar Kobe University, Kobe, Japan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
generate Odd row numbers in VBA
Why a formula like =SUMPRODUCT(A1:A11,MOD(ROW(A1:A11),2)) which will add the
cells A1, A3, A5, A7, A9 and A11? If you want to do it in VBA, use a loop with a step equals to 2: Total = 0 For iRow = 1 To 11 Step 2 Total = Total + Cells(iRow, 1) Next iRow |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Generate random numbers | Excel Discussion (Misc queries) | |||
generate numbers | Excel Discussion (Misc queries) | |||
How to generate #'s that excludes certain numbers? | Excel Worksheet Functions | |||
Generate new account numbers? | New Users to Excel | |||
Generate consecutive numbers | Excel Worksheet Functions |