Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Sumif with 2 ranges & 2 criteria

Hi, I have been trying to figure out a way to use the sumif with 2 criteria &
2 ranges...here is what it looks like
Name Job Name Class Amount
Lee Bolding Const Lot 27 Labor 1000
Tom Moran lot 25 Labor 5000
Seneca Hardwood lot 27 materials 2000

I want a formula that gives me the total amount of all job names containing
"lot 27" in which contain the class "labor". I have been able to get the
total amount of just lot 27, but not 2 different criteria.
Can you help?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Sumif with 2 ranges & 2 criteria

=SUMPRODUCT(--(Job_Name="Lot 27"),--(class="Labor"),Amount)

"cgibby" wrote:

Hi, I have been trying to figure out a way to use the sumif with 2 criteria &
2 ranges...here is what it looks like
Name Job Name Class Amount
Lee Bolding Const Lot 27 Labor 1000
Tom Moran lot 25 Labor 5000
Seneca Hardwood lot 27 materials 2000

I want a formula that gives me the total amount of all job names containing
"lot 27" in which contain the class "labor". I have been able to get the
total amount of just lot 27, but not 2 different criteria.
Can you help?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Sumif with 2 ranges & 2 criteria

I don't know why, but it doesn't work...it just gave me "#Name?" - maybe it's
because i don't understand the sumproduct function and how it works...is
there no way to do it with the sumif function?

"Teethless mama" wrote:

=SUMPRODUCT(--(Job_Name="Lot 27"),--(class="Labor"),Amount)

"cgibby" wrote:

Hi, I have been trying to figure out a way to use the sumif with 2 criteria &
2 ranges...here is what it looks like
Name Job Name Class Amount
Lee Bolding Const Lot 27 Labor 1000
Tom Moran lot 25 Labor 5000
Seneca Hardwood lot 27 materials 2000

I want a formula that gives me the total amount of all job names containing
"lot 27" in which contain the class "labor". I have been able to get the
total amount of just lot 27, but not 2 different criteria.
Can you help?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Sumif with 2 ranges & 2 criteria

It's probably because you don't have your options set to use row and
column labels. Try

=SUMPRODUCT(--(B2:B4="Lot 27"),--(C2:C6="Labor"),D2:D6)

In article ,
cgibby wrote:

I don't know why, but it doesn't work...it just gave me "#Name?" - maybe it's
because i don't understand the sumproduct function and how it works...is
there no way to do it with the sumif function?

"Teethless mama" wrote:

=SUMPRODUCT(--(Job_Name="Lot 27"),--(class="Labor"),Amount)

"cgibby" wrote:

Hi, I have been trying to figure out a way to use the sumif with 2
criteria &
2 ranges...here is what it looks like
Name Job Name Class Amount
Lee Bolding Const Lot 27 Labor 1000
Tom Moran lot 25 Labor 5000
Seneca Hardwood lot 27 materials 2000

I want a formula that gives me the total amount of all job names
containing
"lot 27" in which contain the class "labor". I have been able to get the
total amount of just lot 27, but not 2 different criteria.
Can you help?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Sumif with 2 ranges & 2 criteria

Ok I got that to work, thanks you!
i have another question though. I tried using
(--($B:$B="Lot 27"),(--($C:$C="Labor"),$D:$D) to add all of the columns,
but it didn't work. is there a reason why i can't do the "$"

"JE McGimpsey" wrote:

It's probably because you don't have your options set to use row and
column labels. Try

=SUMPRODUCT(--(B2:B4="Lot 27"),--(C2:C6="Labor"),D2:D6)

In article ,
cgibby wrote:

I don't know why, but it doesn't work...it just gave me "#Name?" - maybe it's
because i don't understand the sumproduct function and how it works...is
there no way to do it with the sumif function?

"Teethless mama" wrote:

=SUMPRODUCT(--(Job_Name="Lot 27"),--(class="Labor"),Amount)

"cgibby" wrote:

Hi, I have been trying to figure out a way to use the sumif with 2
criteria &
2 ranges...here is what it looks like
Name Job Name Class Amount
Lee Bolding Const Lot 27 Labor 1000
Tom Moran lot 25 Labor 5000
Seneca Hardwood lot 27 materials 2000

I want a formula that gives me the total amount of all job names
containing
"lot 27" in which contain the class "labor". I have been able to get the
total amount of just lot 27, but not 2 different criteria.
Can you help?





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Sumif with 2 ranges & 2 criteria

Prior to XL07, array formulae (which SUMPRODUCTs are, even though they
don't need to be entered with CTRL-SHIFT-ENTER) don't accept entire
columns as arguments.

You could use something like:

--($B$1:$B65535="Lot 27")

In article ,
cgibby wrote:

Ok I got that to work, thanks you!
i have another question though. I tried using
(--($B:$B="Lot 27"),(--($C:$C="Labor"),$D:$D) to add all of the columns,
but it didn't work. is there a reason why i can't do the "$"

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Sumif with 2 ranges & 2 criteria

ok thanks so much for your help!

"JE McGimpsey" wrote:

Prior to XL07, array formulae (which SUMPRODUCTs are, even though they
don't need to be entered with CTRL-SHIFT-ENTER) don't accept entire
columns as arguments.

You could use something like:

--($B$1:$B65535="Lot 27")

In article ,
cgibby wrote:

Ok I got that to work, thanks you!
i have another question though. I tried using
(--($B:$B="Lot 27"),(--($C:$C="Labor"),$D:$D) to add all of the columns,
but it didn't work. is there a reason why i can't do the "$"


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
SUMIF ranges John Excel Worksheet Functions 2 September 24th 07 03:54 PM
SUMIF using two ranges yvonneb Excel Discussion (Misc queries) 3 May 31st 07 12:46 PM
Calculate a SUMIF if criteria is between 2 date ranges Anthony P Excel Worksheet Functions 4 October 13th 06 05:12 PM
SUMIF with Mutiple Ranges & Criteria PokerZan Excel Discussion (Misc queries) 5 August 4th 05 10:31 PM
nested sumif or sumif with two criteria dshigley Excel Worksheet Functions 5 April 5th 05 03:34 AM


All times are GMT +1. The time now is 10:33 AM.

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"