Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
SUM OFFSET COLUMNS
Hey there,
I am trying to do something pretty basic, but not having much luck at this point. All I need to do is sum every 2nd column of a sheet after A1...So as an example, A1=name and then I need to sum the values in B1, D1, F1, H1..etc thanks for any assistance on this basic question. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
SUM OFFSET COLUMNS
Use the array formula
=SUMPRODUCT(--(MOD(COLUMN(B1:IV1),2)=0),B1:IV1) by committing it with Ctrl-Shift-Enter "alien1155" wrote: Hey there, I am trying to do something pretty basic, but not having much luck at this point. All I need to do is sum every 2nd column of a sheet after A1...So as an example, A1=name and then I need to sum the values in B1, D1, F1, H1..etc thanks for any assistance on this basic question. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
SUM OFFSET COLUMNS
Thanks, that seems to do the trick, can you break it down, I like to
understand why these things work, then I can apply it to other situations. IE: how does the ",2" and the "=0" affect the way the formula calculates across the columns. Thanks, I appreciate any feedback that will allow me to understand this formula. "Duke Carey" wrote: Use the array formula =SUMPRODUCT(--(MOD(COLUMN(B1:IV1),2)=0),B1:IV1) by committing it with Ctrl-Shift-Enter "alien1155" wrote: Hey there, I am trying to do something pretty basic, but not having much luck at this point. All I need to do is sum every 2nd column of a sheet after A1...So as an example, A1=name and then I need to sum the values in B1, D1, F1, H1..etc thanks for any assistance on this basic question. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
SUM OFFSET COLUMNS
|
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
SUM OFFSET COLUMNS
The Mod component divides the column number by 2 and yields the remainder.
When the col# is even, i.e., the remainder is zero, that portion of the formula returns TRUE. The formula then has two arrays - one of TRUEs and FALSEs (which are converted to 1s and 0s by the --) and one of the cell values in the referenced row. SUMPRODUCT multiplies each value in the 1/0 array by the corresponding value in the array of row values and sums the products. Since zero * anything is zero, the only values that get included in the sum are the values in the even numbered columns "alien1155" wrote: Thanks, that seems to do the trick, can you break it down, I like to understand why these things work, then I can apply it to other situations. IE: how does the ",2" and the "=0" affect the way the formula calculates across the columns. Thanks, I appreciate any feedback that will allow me to understand this formula. "Duke Carey" wrote: Use the array formula =SUMPRODUCT(--(MOD(COLUMN(B1:IV1),2)=0),B1:IV1) by committing it with Ctrl-Shift-Enter "alien1155" wrote: Hey there, I am trying to do something pretty basic, but not having much luck at this point. All I need to do is sum every 2nd column of a sheet after A1...So as an example, A1=name and then I need to sum the values in B1, D1, F1, H1..etc thanks for any assistance on this basic question. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"Text to Columns" for many columns in Excel 2003 | Excel Discussion (Misc queries) | |||
Merging two columns and keeping the data from both | Excel Worksheet Functions | |||
creating columns with data from offset rows | Excel Discussion (Misc queries) | |||
How do I offset TWO columns behind another TWO columns? | Charts and Charting in Excel | |||
Removing Near-Duplicate Rows, Leaving Those w/Most Data in Specific Columns | Excel Discussion (Misc queries) |