Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tina
 
Posts: n/a
Default Sum if or sum product?

I looked at the postings for Sum if and Sum product, but can't get it to do
what I need. I want to count the total hours for Pam if she is listed for a
shift (G9:M16). The hours of the shift are in F9:F16 (see below)

I've tried =SUMPRODUCT((G9:M16="Pam"),F9:F16) & received a value error.
=SUMIF(G9:M17,"Pam",F9:F16) only results in 7.5, counting her first occurence.
F SHIFTS
7:00 AM 2:30 PM 7.5 Pam Alpha
7:15 AM 2:45 PM 7.5 Pam Gloria
8:00 AM 4:00 PM 8 Pam

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
hans bal(nl)
 
Posts: n/a
Default Sum if or sum product?

This is not sophisticated but it works : add an extra column after the
columns for the shifts and enter the formula:
=if(or(C1="Pam",D1="Pam",E1="Pam");1;0)
This formula gives 1 as a result if Pam has worked in any shift and returns
0 if Pam isn't in any of the shifts. Than you can multiply the number of
hours with this result.

Hope this helps.

Hans


"Tina" wrote:

I looked at the postings for Sum if and Sum product, but can't get it to do
what I need. I want to count the total hours for Pam if she is listed for a
shift (G9:M16). The hours of the shift are in F9:F16 (see below)

I've tried =SUMPRODUCT((G9:M16="Pam"),F9:F16) & received a value error.
=SUMIF(G9:M17,"Pam",F9:F16) only results in 7.5, counting her first occurence.
F SHIFTS
7:00 AM 2:30 PM 7.5 Pam Alpha
7:15 AM 2:45 PM 7.5 Pam Gloria
8:00 AM 4:00 PM 8 Pam

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SteveG
 
Posts: n/a
Default Sum if or sum product?


Tina,

Your syntax is off a bit. Try

=SUMPRODUCT((G1:M16="Pam")*(F1:F16))

Does that help?

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=537755

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Sum if or sum product?


Your sumproduct nearly works, just replace the , with *

=SUMPRODUCT((G9:M16="Pam")*F9:F16)

Note that if Pam appears twice in any row the value in column F for
that row will be counted twice....


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=537755

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tina
 
Posts: n/a
Default Sum if or sum product?

Thanks everyone for your help!

"SteveG" wrote:


Tina,

Your syntax is off a bit. Try

=SUMPRODUCT((G1:M16="Pam")*(F1:F16))

Does that help?

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=537755


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
Group Repeating Text Values in a Column? ConfusedNHouston Excel Discussion (Misc queries) 1 April 25th 06 03:59 PM
Counting Rows/Columns for Copying Formulas SamDev Excel Discussion (Misc queries) 0 June 24th 05 04:13 AM
Percentages Darryl Charts and Charting in Excel 2 May 21st 05 04:31 PM
How to set a formula to count the product appear how manytime AMY Excel Worksheet Functions 3 March 21st 05 09:49 AM
Which function(s)? LB Excel Worksheet Functions 3 January 5th 05 06:19 PM


All times are GMT +1. The time now is 12:33 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"