Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default SumIF based on Multiple Conditions

I have data in 5 different columns, of which Column 'A', 'B' and 'C' contains
text and Column 'D' and 'E' contains numbers. Could you please tell me a
formula through which i can add the numbers in column 'E' if Column 'A', 'B',
'C' and D has the the required data.

I tried with an array formula
{=SUM(IF((A$2:A$9999="XX")*(B$2:B$9999="XY")*(C$2: C$9999="yy")*(D$2:D$9999="11"),E$2:E$9999))}

A B C D E
xx xy yy 11 123



--
Karthi
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default SumIF based on Multiple Conditions

Remove the quotes from around the 11:

....(D$2:D$9999="11")...

....(D$2:D$9999=11)...

Better to use cells to hold the criteria then reference those cells:

G2 = XX
H2 = XY
I2 = YY
J2 = 11

Array entered:

=SUM(IF((A$2:A$9999=G2)*(B$2:B$9999=H2)*(C$2:C$999 9=I2)*(D$2:D$9999=J2),E$2:E$9999))

Or, this normally entered version:

=SUMPRODUCT(--(A$2:A$9999=G2),--(B$2:B$9999=H2),--(C$2:C$9999=I2),--(D$2:D$9999=J2),E$2:E$9999)


--
Biff
Microsoft Excel MVP


"Karthik" wrote in message
...
I have data in 5 different columns, of which Column 'A', 'B' and 'C'
contains
text and Column 'D' and 'E' contains numbers. Could you please tell me a
formula through which i can add the numbers in column 'E' if Column 'A',
'B',
'C' and D has the the required data.

I tried with an array formula
{=SUM(IF((A$2:A$9999="XX")*(B$2:B$9999="XY")*(C$2: C$9999="yy")*(D$2:D$9999="11"),E$2:E$9999))}

A B C D E
xx xy yy 11 123



--
Karthi



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default SumIF based on Multiple Conditions

Thank you very much T.Valko

The formula adds everything in the column 'E' but i would like to know the
formula to sum column 'E' only when the row satisfies all the conditions.

Example:
A B C D E
xx cd yy 10 10
xx cd yy 11 10
xx cd yy 10 10
xx xy yx 11 15
d yx yy 11 15

I would like to know a formula which adds column 'E' only if Col 'A'=xx, Col
'B'=cd, Col 'C'=11 and Col 'D' =10.

In the above case the anwer should be 20.

--
Karthi


"T. Valko" wrote:

Remove the quotes from around the 11:

....(D$2:D$9999="11")...

....(D$2:D$9999=11)...

Better to use cells to hold the criteria then reference those cells:

G2 = XX
H2 = XY
I2 = YY
J2 = 11

Array entered:

=SUM(IF((A$2:A$9999=G2)*(B$2:B$9999=H2)*(C$2:C$999 9=I2)*(D$2:D$9999=J2),E$2:E$9999))

Or, this normally entered version:

=SUMPRODUCT(--(A$2:A$9999=G2),--(B$2:B$9999=H2),--(C$2:C$9999=I2),--(D$2:D$9999=J2),E$2:E$9999)


--
Biff
Microsoft Excel MVP


"Karthik" wrote in message
...
I have data in 5 different columns, of which Column 'A', 'B' and 'C'
contains
text and Column 'D' and 'E' contains numbers. Could you please tell me a
formula through which i can add the numbers in column 'E' if Column 'A',
'B',
'C' and D has the the required data.

I tried with an array formula
{=SUM(IF((A$2:A$9999="XX")*(B$2:B$9999="XY")*(C$2: C$9999="yy")*(D$2:D$9999="11"),E$2:E$9999))}

A B C D E
xx xy yy 11 123



--
Karthi

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default SumIF based on Multiple Conditions

I would like to know a formula which adds column 'E'
only if Col 'A'=xx, Col 'B'=cd, Col 'C'=11 and Col 'D' =10.


In your posted sample there is no 11 in column C. If you meant column C =
"yy"...

The formulas I posted in my previous reply will do what you want. If they're
not working then explain what is not working. The formulas are correct.


--
Biff
Microsoft Excel MVP


"Karthik" wrote in message
...
Thank you very much T.Valko

The formula adds everything in the column 'E' but i would like to know the
formula to sum column 'E' only when the row satisfies all the conditions.

Example:
A B C D E
xx cd yy 10 10
xx cd yy 11 10
xx cd yy 10 10
xx xy yx 11 15
d yx yy 11 15

I would like to know a formula which adds column 'E' only if Col 'A'=xx,
Col
'B'=cd, Col 'C'=11 and Col 'D' =10.

In the above case the anwer should be 20.

--
Karthi


"T. Valko" wrote:

Remove the quotes from around the 11:

....(D$2:D$9999="11")...

....(D$2:D$9999=11)...

Better to use cells to hold the criteria then reference those cells:

G2 = XX
H2 = XY
I2 = YY
J2 = 11

Array entered:

=SUM(IF((A$2:A$9999=G2)*(B$2:B$9999=H2)*(C$2:C$999 9=I2)*(D$2:D$9999=J2),E$2:E$9999))

Or, this normally entered version:

=SUMPRODUCT(--(A$2:A$9999=G2),--(B$2:B$9999=H2),--(C$2:C$9999=I2),--(D$2:D$9999=J2),E$2:E$9999)


--
Biff
Microsoft Excel MVP


"Karthik" wrote in message
...
I have data in 5 different columns, of which Column 'A', 'B' and 'C'
contains
text and Column 'D' and 'E' contains numbers. Could you please tell me
a
formula through which i can add the numbers in column 'E' if Column
'A',
'B',
'C' and D has the the required data.

I tried with an array formula
{=SUM(IF((A$2:A$9999="XX")*(B$2:B$9999="XY")*(C$2: C$9999="yy")*(D$2:D$9999="11"),E$2:E$9999))}

A B C D E
xx xy yy 11 123



--
Karthi



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default SumIF based on Multiple Conditions

Thank you very much T. Valko,
It's doing great, you've reduced my troubles...
--
Karthi


"T. Valko" wrote:

I would like to know a formula which adds column 'E'
only if Col 'A'=xx, Col 'B'=cd, Col 'C'=11 and Col 'D' =10.


In your posted sample there is no 11 in column C. If you meant column C =
"yy"...

The formulas I posted in my previous reply will do what you want. If they're
not working then explain what is not working. The formulas are correct.


--
Biff
Microsoft Excel MVP


"Karthik" wrote in message
...
Thank you very much T.Valko

The formula adds everything in the column 'E' but i would like to know the
formula to sum column 'E' only when the row satisfies all the conditions.

Example:
A B C D E
xx cd yy 10 10
xx cd yy 11 10
xx cd yy 10 10
xx xy yx 11 15
d yx yy 11 15

I would like to know a formula which adds column 'E' only if Col 'A'=xx,
Col
'B'=cd, Col 'C'=11 and Col 'D' =10.

In the above case the anwer should be 20.

--
Karthi


"T. Valko" wrote:

Remove the quotes from around the 11:

....(D$2:D$9999="11")...

....(D$2:D$9999=11)...

Better to use cells to hold the criteria then reference those cells:

G2 = XX
H2 = XY
I2 = YY
J2 = 11

Array entered:

=SUM(IF((A$2:A$9999=G2)*(B$2:B$9999=H2)*(C$2:C$999 9=I2)*(D$2:D$9999=J2),E$2:E$9999))

Or, this normally entered version:

=SUMPRODUCT(--(A$2:A$9999=G2),--(B$2:B$9999=H2),--(C$2:C$9999=I2),--(D$2:D$9999=J2),E$2:E$9999)


--
Biff
Microsoft Excel MVP


"Karthik" wrote in message
...
I have data in 5 different columns, of which Column 'A', 'B' and 'C'
contains
text and Column 'D' and 'E' contains numbers. Could you please tell me
a
formula through which i can add the numbers in column 'E' if Column
'A',
'B',
'C' and D has the the required data.

I tried with an array formula
{=SUM(IF((A$2:A$9999="XX")*(B$2:B$9999="XY")*(C$2: C$9999="yy")*(D$2:D$9999="11"),E$2:E$9999))}

A B C D E
xx xy yy 11 123



--
Karthi






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default SumIF based on Multiple Conditions

Good deal. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Karthik" wrote in message
...
Thank you very much T. Valko,
It's doing great, you've reduced my troubles...
--
Karthi


"T. Valko" wrote:

I would like to know a formula which adds column 'E'
only if Col 'A'=xx, Col 'B'=cd, Col 'C'=11 and Col 'D' =10.


In your posted sample there is no 11 in column C. If you meant column C =
"yy"...

The formulas I posted in my previous reply will do what you want. If
they're
not working then explain what is not working. The formulas are correct.


--
Biff
Microsoft Excel MVP


"Karthik" wrote in message
...
Thank you very much T.Valko

The formula adds everything in the column 'E' but i would like to know
the
formula to sum column 'E' only when the row satisfies all the
conditions.

Example:
A B C D E
xx cd yy 10 10
xx cd yy 11 10
xx cd yy 10 10
xx xy yx 11 15
d yx yy 11 15

I would like to know a formula which adds column 'E' only if Col
'A'=xx,
Col
'B'=cd, Col 'C'=11 and Col 'D' =10.

In the above case the anwer should be 20.

--
Karthi


"T. Valko" wrote:

Remove the quotes from around the 11:

....(D$2:D$9999="11")...

....(D$2:D$9999=11)...

Better to use cells to hold the criteria then reference those cells:

G2 = XX
H2 = XY
I2 = YY
J2 = 11

Array entered:

=SUM(IF((A$2:A$9999=G2)*(B$2:B$9999=H2)*(C$2:C$999 9=I2)*(D$2:D$9999=J2),E$2:E$9999))

Or, this normally entered version:

=SUMPRODUCT(--(A$2:A$9999=G2),--(B$2:B$9999=H2),--(C$2:C$9999=I2),--(D$2:D$9999=J2),E$2:E$9999)


--
Biff
Microsoft Excel MVP


"Karthik" wrote in message
...
I have data in 5 different columns, of which Column 'A', 'B' and 'C'
contains
text and Column 'D' and 'E' contains numbers. Could you please tell
me
a
formula through which i can add the numbers in column 'E' if Column
'A',
'B',
'C' and D has the the required data.

I tried with an array formula
{=SUM(IF((A$2:A$9999="XX")*(B$2:B$9999="XY")*(C$2: C$9999="yy")*(D$2:D$9999="11"),E$2:E$9999))}

A B C D E
xx xy yy 11 123



--
Karthi






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-multiple conditions/OR GaryW New Users to Excel 7 May 15th 08 04:16 PM
SUMIF with Multiple Conditions TexJen09 Excel Worksheet Functions 5 March 17th 08 03:39 AM
sumif with multiple conditions Slax Excel Worksheet Functions 5 April 12th 06 10:27 PM
SUMIF based on two conditions grey Excel Worksheet Functions 6 August 1st 05 04:51 PM
SUMIF based on 2 conditions TimH Excel Worksheet Functions 3 October 28th 04 08:18 PM


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