Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default How do I sum hours with multiple criteria

I have a spreadsheet that looks something like this:

W/C HOURS DATE
XEN1 .5 11/08/07
XDN5 1.8 12/01/09
XQAE 10 02/06/08
XEN1 1.7 03/25/09
XEN1 2.4 11/27/07
XDN5 5.9 11/30/09

I have to get the hours for all the XEN1 for the month/year for example:

I would need to arrive at 2.9 hours for XEN1 for the 11th month of 2007.
--
DMM
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default How do I sum hours with multiple criteria

Hi,

Try this

=SUMPRODUCT((A1:A10="XEN1")*(MONTH(C1:C10)=11)*(YE AR(C1:C10)=2007)*(B1:B10))

You should also format as [hh]:mm

Mike

"soconfused" wrote:

I have a spreadsheet that looks something like this:

W/C HOURS DATE
XEN1 .5 11/08/07
XDN5 1.8 12/01/09
XQAE 10 02/06/08
XEN1 1.7 03/25/09
XEN1 2.4 11/27/07
XDN5 5.9 11/30/09

I have to get the hours for all the XEN1 for the month/year for example:

I would need to arrive at 2.9 hours for XEN1 for the 11th month of 2007.
--
DMM

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default How do I sum hours with multiple criteria

You should also format as [hh]:mm
Perhaps not. My bet is that the hours are stored as a number, not as a time.
If so, use any number format, or General.

Regards,
Fred


"Mike H" wrote in message
...
Hi,

Try this

=SUMPRODUCT((A1:A10="XEN1")*(MONTH(C1:C10)=11)*(YE AR(C1:C10)=2007)*(B1:B10))

You should also format as [hh]:mm

Mike

"soconfused" wrote:

I have a spreadsheet that looks something like this:

W/C HOURS DATE
XEN1 .5 11/08/07
XDN5 1.8 12/01/09
XQAE 10 02/06/08
XEN1 1.7 03/25/09
XEN1 2.4 11/27/07
XDN5 5.9 11/30/09

I have to get the hours for all the XEN1 for the month/year for example:

I would need to arrive at 2.9 hours for XEN1 for the 11th month of 2007.
--
DMM


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 93
Default How do I sum hours with multiple criteria

That was great, but as I looked at my spreadsheet, I need to make the "XEN1"
a wildcard or be able to include two or three others such as XTEN AND XIEN
AND XQAE? Can that be done?

Thank you so much.
--
DMM


"Mike H" wrote:

Hi,

Try this

=SUMPRODUCT((A1:A10="XEN1")*(MONTH(C1:C10)=11)*(YE AR(C1:C10)=2007)*(B1:B10))

You should also format as [hh]:mm

Mike

"soconfused" wrote:

I have a spreadsheet that looks something like this:

W/C HOURS DATE
XEN1 .5 11/08/07
XDN5 1.8 12/01/09
XQAE 10 02/06/08
XEN1 1.7 03/25/09
XEN1 2.4 11/27/07
XDN5 5.9 11/30/09

I have to get the hours for all the XEN1 for the month/year for example:

I would need to arrive at 2.9 hours for XEN1 for the 11th month of 2007.
--
DMM

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 915
Default How do I sum hours with multiple criteria

soconfused wrote:
That was great, but as I looked at my spreadsheet, I need to make the "XEN1"
a wildcard or be able to include two or three others such as XTEN AND XIEN
AND XQAE? Can that be done?

Thank you so much.


"Mike H" wrote:
Hi,

Try this


=SUMPRODUCT((A1:A10="XEN1")*(MONTH(C1:C10)=11)*(YE AR(C1:C10)=2007)*(B1:B10))

You can modify Mike's formula a little to look for the search term in a
cell.

Suppose column F has XEN1, XTEN, etc.

Then use this, e.g., in G1:

=SUMPRODUCT(($A$1:$A$10=F1)*(MONTH($C$1:$C$10)=11) *(YEAR($C$1:$C$10)=2007)*($B$1:$B$10))

Notice I also added absolute referencing for the data area, so you can
fill this formula down as far as needed.

Using the "cell as a search term" technique, you can also make variables
out of the year and month.
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
Count multiple cells against multiple criteria in an Excel spreads EricB Excel Worksheet Functions 7 June 3rd 08 09:09 PM
match multiple criteria ina range from multiple criteria multiplet RG Excel Worksheet Functions 8 September 28th 07 04:21 AM
Index & Match functions - multiple criteria and multiple results [email protected] Excel Worksheet Functions 4 May 2nd 07 03:13 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Saleem Excel Worksheet Functions 1 January 12th 05 10:54 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Arain Excel Worksheet Functions 1 January 12th 05 08:33 AM


All times are GMT +1. The time now is 01:02 PM.

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

About Us

"It's about Microsoft Excel"