Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Text to Columns" for many columns in Excel 2003 NickName Excel Discussion (Misc queries) 12 September 8th 06 10:14 PM
Merging two columns and keeping the data from both Stosh Excel Worksheet Functions 9 July 27th 06 06:48 PM
creating columns with data from offset rows Scott Kelley Excel Discussion (Misc queries) 2 November 14th 05 02:15 AM
How do I offset TWO columns behind another TWO columns? Moxy1980 Charts and Charting in Excel 1 October 25th 05 04:30 PM
Removing Near-Duplicate Rows, Leaving Those w/Most Data in Specific Columns foofoo Excel Discussion (Misc queries) 1 April 2nd 05 12:02 AM


All times are GMT +1. The time now is 10:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"