Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Result based on two criteria

Hi,

I'm trying to set it up so that all figures which match the same two
criteria are all added up together, using only one formula.

Both criteria are based on Text - for instance "English", and "September"

So far I've got this for both, but can't work out how to combine them both.

=SUMIF(A:A,"English",G:G)
&
=SUMIF(B:B,"September",G:G)

Is there any way of getting it so that the overall sum of all entries
matching both criteria is shown?

Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default Result based on two criteria

Hi,
try

=SUMPRODUCT((A:A="English")*(B:B="September"),G:G)

"Ben12956" wrote:

Hi,

I'm trying to set it up so that all figures which match the same two
criteria are all added up together, using only one formula.

Both criteria are based on Text - for instance "English", and "September"

So far I've got this for both, but can't work out how to combine them both.

=SUMIF(A:A,"English",G:G)
&
=SUMIF(B:B,"September",G:G)

Is there any way of getting it so that the overall sum of all entries
matching both criteria is shown?

Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Result based on two criteria

Try
=SUMPRODUCT((A1:A1000="English")*(B1:B1000="Septem ber"),G1:G1000)

--
Jacob


"Ben12956" wrote:

Hi,

I'm trying to set it up so that all figures which match the same two
criteria are all added up together, using only one formula.

Both criteria are based on Text - for instance "English", and "September"

So far I've got this for both, but can't work out how to combine them both.

=SUMIF(A:A,"English",G:G)
&
=SUMIF(B:B,"September",G:G)

Is there any way of getting it so that the overall sum of all entries
matching both criteria is shown?

Thanks in advance.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Result based on two criteria

If you're using Excel 2007:

=SUMIFS(G:G,A:A,"English",B:B,"September")

This one will work in any version of Excel but you *can't* use entire
columns as range references unless you're using Excel 2007.

=SUMPRODUCT(--(A1:A100="English"),--(B1:B100="September"),G1:G100)

Better to use cells to hold the criteria:

I1 = English
J1 = September

=SUMIFS(G:G,A:A,I1,B:B,J1)

=SUMPRODUCT(--(A1:A100=I1),--(B1:B100=J1),G1:G100)

--
Biff
Microsoft Excel MVP


"Ben12956" wrote in message
...
Hi,

I'm trying to set it up so that all figures which match the same two
criteria are all added up together, using only one formula.

Both criteria are based on Text - for instance "English", and "September"

So far I've got this for both, but can't work out how to combine them
both.

=SUMIF(A:A,"English",G:G)
&
=SUMIF(B:B,"September",G:G)

Is there any way of getting it so that the overall sum of all entries
matching both criteria is shown?

Thanks in advance.



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
Query criteria based on a changing criteria list bwilk77 Excel Discussion (Misc queries) 2 May 27th 09 04:03 PM
Search 2 Criteria for 1 sep result brad watson Excel Discussion (Misc queries) 1 June 4th 08 05:00 PM
Result Based on Date Criteria pobm62 Excel Discussion (Misc queries) 6 November 1st 06 10:07 PM
how can I have a formula result based on multiple criteria/columns nicky_p New Users to Excel 1 July 5th 06 01:45 PM
vlookup based on random result returns incorrect result rickat Excel Worksheet Functions 1 December 6th 05 01:16 PM


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