Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Conditionally SUM Across Multiple Columns

I am quite certain that SUMPRODUCT is the solution to my problem, but
I cannot get it to work correctly. My 'Data Source' sheet looks like
this:

A B C D
1 Account No. 5/2007 6/2007 7/2007
2 001 100.00 200.00 300.00
3 002 50.00 60.00 70.00
4 003 10.00 11.00 12.00

The sheet ('Analysis') that I am performing my analysis on will look
like this:

A B C
1 Account No. Last 3 Months Last 2 Months.......
2 001 600.00 500.00
3 002 180.00 130.00
4 003 33.00 23.00

For the purpose of my question, let's focus on getting the formula for
cell B2 on the 'Analysis' sheet. I suspect the formula will work like
this:

=SUMPRODUCT((condition that matches account number on Analysis to Data
Source)*(condition that selects which months to include)*(some range
of cells))

Any help would be very much appreciated.

Kevin

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Conditionally SUM Across Multiple Columns

in b2 in "Analysis":

=SUMPRODUCT((Sheet1!$A$2:$A$4=$A2)*(MONTH(Sheet1!$ B$1:$D$1)=MONTH(TODAY())-3)*(Sheet1!$B$2:$D$4))

in C2:

=SUMPRODUCT((Sheet1!$A$2:$A$4=$A2)*(MONTH(Sheet1!$ B$1:$D$1)=MONTH(TODAY())-2)*(Sheet1!$B$2:$D$4))

Copy both down

Sheet1 is you "Data Source"

HTH

"DoooWhat" wrote:

I am quite certain that SUMPRODUCT is the solution to my problem, but
I cannot get it to work correctly. My 'Data Source' sheet looks like
this:

A B C D
1 Account No. 5/2007 6/2007 7/2007
2 001 100.00 200.00 300.00
3 002 50.00 60.00 70.00
4 003 10.00 11.00 12.00

The sheet ('Analysis') that I am performing my analysis on will look
like this:

A B C
1 Account No. Last 3 Months Last 2 Months.......
2 001 600.00 500.00
3 002 180.00 130.00
4 003 33.00 23.00

For the purpose of my question, let's focus on getting the formula for
cell B2 on the 'Analysis' sheet. I suspect the formula will work like
this:

=SUMPRODUCT((condition that matches account number on Analysis to Data
Source)*(condition that selects which months to include)*(some range
of cells))

Any help would be very much appreciated.

Kevin


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Conditionally SUM Across Multiple Columns

Ah, that worked. Thanks so much for your help!

Kevin

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
Multiple sets of columns into one set of columns no blanks CathyH Excel Discussion (Misc queries) 0 May 22nd 07 09:11 PM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 2 July 31st 06 09:45 PM
Combine multiple columns into two long columns, Repeating rows in first column [email protected] Excel Discussion (Misc queries) 0 July 31st 06 05:07 PM
Macro preparing numbers to be booked (columns to be chosen conditionally) markx Excel Worksheet Functions 0 May 23rd 06 03:11 PM
count conditionally across two columns? gpoky Excel Worksheet Functions 2 December 6th 05 04:56 PM


All times are GMT +1. The time now is 11:09 PM.

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"