Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
IpcTrain
 
Posts: n/a
Default Using 'AND' logic in a SUMIF statement

In EXCEL 2003, how can I incorporate 'AND' logic in a 'SUMIF'
statement? If not, what other function can I use to sum a column of
cells given TWO conditions. This is what I have and it does not work:
=SUMIF(Salary!G9:G62,62008+AND(Salary!J9:J62,40102 ),Salary!Y9:Y62). I'm
testing G9:G62 on the Salary worksheet for value "62008" AND J9:J62 on
the Salary worksheet for value "40102" then summing Y9:Y62 of the
Salary worksheet, matching these conditions. The return value is
entered on another worksheet of the same workbook. Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick
 
Posts: n/a
Default Using 'AND' logic in a SUMIF statement

=SUMPRODUCT((Salary!G9:G62=62008)*(Salary!J9:J62=4 0102)*(Salary!Y9:Y62))

HTH,
Bernie
MS Excel MVP


"IpcTrain" wrote in message
ups.com...
In EXCEL 2003, how can I incorporate 'AND' logic in a 'SUMIF'
statement? If not, what other function can I use to sum a column of
cells given TWO conditions. This is what I have and it does not work:
=SUMIF(Salary!G9:G62,62008+AND(Salary!J9:J62,40102 ),Salary!Y9:Y62). I'm
testing G9:G62 on the Salary worksheet for value "62008" AND J9:J62 on
the Salary worksheet for value "40102" then summing Y9:Y62 of the
Salary worksheet, matching these conditions. The return value is
entered on another worksheet of the same workbook. Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Using 'AND' logic in a SUMIF statement

=SUMPRODUCT(--(Salary!G9:G62=62008),--(Salary!J9:J62=40102),Salary!Y9:Y62)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"IpcTrain" wrote in message
ups.com...
In EXCEL 2003, how can I incorporate 'AND' logic in a 'SUMIF'
statement? If not, what other function can I use to sum a column of
cells given TWO conditions. This is what I have and it does not work:
=SUMIF(Salary!G9:G62,62008+AND(Salary!J9:J62,40102 ),Salary!Y9:Y62). I'm
testing G9:G62 on the Salary worksheet for value "62008" AND J9:J62 on
the Salary worksheet for value "40102" then summing Y9:Y62 of the
Salary worksheet, matching these conditions. The return value is
entered on another worksheet of the same workbook. Thanks.



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



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