PC Review


Reply
Thread Tools Rate Thread

2 Criteria Summing

 
 
CurtPDX
Guest
Posts: n/a
 
      23rd Feb 2009
I have the following source data:

A1 = name (text)
B1 = start date (as a number displayed in Date format)
E1 = project title (a text string)
F1 = hours (number)

Subsequent rows are in the same format. This source data has ~1000 lines, 8
different project titles and 12 date ranges.

I want to create a summary table as follows:
Rows represent a date range (manually pre-defined)
Columns are for each project
The intersection of a row & column gives the sum of hours for that time
period and that project.
That is, the result looks like the following:
A1 = -- blank --
A2 = date1
A3 = date2
A4 = date3
B2 = project title1 (a string)
C2 = project title2

B2 = sum of hours (from source data) for date1 and project title1
C2 = sum of hours for date1 and project title2
B3 = sum of hours for date2 and project title1
C3 = sum of hours for date2 and project title2

etc.

(In one case the projects are titled "foo sprint 1", "foo sprint 2", "foo
sprints 11-20", etc. I want to aggregate them under "foo sprint" so I'll
need some "string contains" truth function.)

I think I want to use SumIF, but I'm struggling to define the criteria for
this two-way match.

Thanks.
 
Reply With Quote
 
 
 
 
Pete_UK
Guest
Posts: n/a
 
      23rd Feb 2009
You could think about using a pivot table, but if you require a
formula solution then you can put this in B2:

=SUMPRODUCT((source!$B$1:$B$1000=$A2)*(source!$E$1:$E$1000=B$1)*
(source!$F$1:$F$1000))

Then copy across and down as required.

This will look for exact matches with the entries on row 1, so if you
want sub-string matches you can change it to:

=SUMPRODUCT((source!$B$1:$B$1000=$A2)*(ISNUMBER(SEARCH(B$1,source!$E
$1:$E$1000)))*(source!$F$1:$F$1000))

You can only use SUMIF for a single condition.

Hope this helps.

Pete

On Feb 23, 6:02*pm, CurtPDX <Curt...@discussions.microsoft.com> wrote:
> I have the following source data:
>
> A1 = name (text)
> B1 = start date (as a number displayed in Date format)
> E1 = project title (a text string)
> F1 = hours (number)
>
> Subsequent rows are in the same format. *This source data has ~1000 lines, 8
> different project titles and 12 date ranges.
>
> I want to create a summary table as follows:
> Rows represent a date range (manually pre-defined)
> Columns are for each project
> The intersection of a row & column gives the sum of hours for that time
> period and that project.
> That is, the result looks like the following:
> A1 = -- blank --
> A2 = date1
> A3 = date2
> A4 = date3
> B2 = project title1 (a string)
> C2 = project title2
>
> B2 = sum of hours (from source data) for date1 and project title1
> C2 = sum of hours for date1 and project title2
> B3 = sum of hours for date2 and project title1
> C3 = sum of hours for date2 and project title2
>
> etc.
>
> (In one case the projects are titled "foo sprint 1", "foo sprint 2", "foo
> sprints 11-20", etc. *I want to aggregate them under "foo sprint" so I'll
> need some "string contains" truth function.)
>
> I think I want to use SumIF, but I'm struggling to define the criteria for
> this two-way match.
>
> Thanks.


 
Reply With Quote
 
Shane Devenshire
Guest
Posts: n/a
 
      23rd Feb 2009
Hi,

In 2007 you can write

=SUMIFS(source!$F$1:$F$1000, source!$B$1:$B$1000,$A2,source!$E$1:$E$1000,B$1)

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"CurtPDX" wrote:

> I have the following source data:
>
> A1 = name (text)
> B1 = start date (as a number displayed in Date format)
> E1 = project title (a text string)
> F1 = hours (number)
>
> Subsequent rows are in the same format. This source data has ~1000 lines, 8
> different project titles and 12 date ranges.
>
> I want to create a summary table as follows:
> Rows represent a date range (manually pre-defined)
> Columns are for each project
> The intersection of a row & column gives the sum of hours for that time
> period and that project.
> That is, the result looks like the following:
> A1 = -- blank --
> A2 = date1
> A3 = date2
> A4 = date3
> B2 = project title1 (a string)
> C2 = project title2
>
> B2 = sum of hours (from source data) for date1 and project title1
> C2 = sum of hours for date1 and project title2
> B3 = sum of hours for date2 and project title1
> C3 = sum of hours for date2 and project title2
>
> etc.
>
> (In one case the projects are titled "foo sprint 1", "foo sprint 2", "foo
> sprints 11-20", etc. I want to aggregate them under "foo sprint" so I'll
> need some "string contains" truth function.)
>
> I think I want to use SumIF, but I'm struggling to define the criteria for
> this two-way match.
>
> Thanks.

 
Reply With Quote
 
Herbert Seidenberg
Guest
Posts: n/a
 
      24th Feb 2009
Excel 2007 Pivot Table
No formulas needed.
Includes "string contains" truth function and chart:
http://www.mediafire.com/file/y1ie43mnmny/02_24_09.xlsx
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
summing with multiple criteria -- but with many OR criteria Mike C Microsoft Excel Discussion 5 26th Feb 2008 06:45 PM
Summing with Criteria =?Utf-8?B?UGl4aWU3OA==?= Microsoft Access Reports 2 25th Jun 2007 08:23 PM
Summing Given A Criteria =?Utf-8?B?Y2FybA==?= Microsoft Access 5 22nd Aug 2006 09:55 PM
Summing with criteria =?Utf-8?B?VEs=?= Microsoft Excel Worksheet Functions 0 15th Sep 2004 06:09 PM
Summing on 2 criteria Reggie Microsoft Excel Worksheet Functions 2 6th Aug 2004 06:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:30 PM.