A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

If 3 If's, then sum



 
 
Thread Tools Display Modes
  #1  
Old April 16th, 2010, 04:10 PM posted to microsoft.public.excel.worksheet.functions
Steve
external usenet poster
 
Posts: 2,662
Default If 3 If's, then sum

I need to add hours if 3 critera match.
In the below, if there is a 90 in the G column AND a 10 in the J Column, AND
a 100 in the D column, then add the H column. Being that this criterea is
found only in row 3 and row 6, I need the result to be 3 (H3 +H6).

row D G H J

3 100 90 2 10
4 200 100 3 11
5 300 110 4 12
6 100 90 1 10
7 200 90 5 10
8 300 90 6 13

Thanks,

Steve
  #2  
Old April 16th, 2010, 04:22 PM posted to microsoft.public.excel.worksheet.functions
Squeaky
external usenet poster
 
Posts: 131
Default If 3 If's, then sum

Hi Steve,

Using your template as shown, place in K3:

=IF(AND(G3=90,J3=10,D3=100)=TRUE,H3,"")

Copy this down the length of your information, then do a sum of column K in
a convenient place.

Squeaky



"Steve" wrote:

I need to add hours if 3 critera match.
In the below, if there is a 90 in the G column AND a 10 in the J Column, AND
a 100 in the D column, then add the H column. Being that this criterea is
found only in row 3 and row 6, I need the result to be 3 (H3 +H6).

row D G H J

3 100 90 2 10
4 200 100 3 11
5 300 110 4 12
6 100 90 1 10
7 200 90 5 10
8 300 90 6 13

Thanks,

Steve

  #3  
Old April 16th, 2010, 04:26 PM posted to microsoft.public.excel.worksheet.functions
MS-Exl-Learner
external usenet poster
 
Posts: 135
Default If 3 If's, then sum

Try this...

=SUMPRODUCT((D3100=100)*(J3:J100=10)*(G3:G100=90 ),H3:H100)

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Steve" wrote:

I need to add hours if 3 critera match.
In the below, if there is a 90 in the G column AND a 10 in the J Column, AND
a 100 in the D column, then add the H column. Being that this criterea is
found only in row 3 and row 6, I need the result to be 3 (H3 +H6).

row D G H J

3 100 90 2 10
4 200 100 3 11
5 300 110 4 12
6 100 90 1 10
7 200 90 5 10
8 300 90 6 13

Thanks,

Steve

  #4  
Old April 16th, 2010, 04:44 PM posted to microsoft.public.excel.worksheet.functions
getting old
external usenet poster
 
Posts: 3
Default If 3 If's, then sum

I have just been playing with this very same requirement. The Sumifs function
seems to do the job.

(excel 2007)

"Ms-Exl-Learner" wrote:

Try this...

=SUMPRODUCT((D3100=100)*(J3:J100=10)*(G3:G100=90 ),H3:H100)

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Steve" wrote:

I need to add hours if 3 critera match.
In the below, if there is a 90 in the G column AND a 10 in the J Column, AND
a 100 in the D column, then add the H column. Being that this criterea is
found only in row 3 and row 6, I need the result to be 3 (H3 +H6).

row D G H J

3 100 90 2 10
4 200 100 3 11
5 300 110 4 12
6 100 90 1 10
7 200 90 5 10
8 300 90 6 13

Thanks,

Steve

  #5  
Old April 16th, 2010, 05:18 PM posted to microsoft.public.excel.worksheet.functions
Steve
external usenet poster
 
Posts: 2,662
Default If 3 If's, then sum

This works great. Thank you.

However, I used a simple example. In reality,the J and G data had 5
variables each, so I was going to create tables such as
row G J
3 90 10
4 90 12
5 90 13
6 90 14
7 90 15
8 100 10
9 100 12
10 100 13
11 100 14
12 100 15, etc.
and use the formula not as specific numbers like 90 or 10, but use the cell
reference like G3 and J3. Where my problem comes is that the D column can be
various numbers up to appx. 200, so I'd like to be able to use in the formula
in place of D3100 =100, something that would use whatever is in that D
column. Is that possible ?

Thanks again,

Steve

"Ms-Exl-Learner" wrote:

Try this...

=SUMPRODUCT((D3100=100)*(J3:J100=10)*(G3:G100=90 ),H3:H100)

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Steve" wrote:

I need to add hours if 3 critera match.
In the below, if there is a 90 in the G column AND a 10 in the J Column, AND
a 100 in the D column, then add the H column. Being that this criterea is
found only in row 3 and row 6, I need the result to be 3 (H3 +H6).

row D G H J

3 100 90 2 10
4 200 100 3 11
5 300 110 4 12
6 100 90 1 10
7 200 90 5 10
8 300 90 6 13

Thanks,

Steve

  #6  
Old April 16th, 2010, 05:36 PM posted to microsoft.public.excel.worksheet.functions
MS-Exl-Learner
external usenet poster
 
Posts: 135
Default If 3 If's, then sum

Not clear whether this is what you are looking for...

1st Formula:-
This will generate the result when D3100 is not blank and when its
matching other criteria
=SUMPRODUCT((D3100"")*(J3:J100=10)*(G3:G100=90 ),H3:H100)

2nd Formula:-
Or simply you can remove the D3100 criteria from the formula like the below
=SUMPRODUCT((J3:J100=10)*(G3:G100=90),H3:H100)

3rd Formula:-
This will generate the result when D3100 is having Numeric Values and when
its matching other criteria. This will leave the Text entries in D3100
eventhough the other criteria's are matching.
=SUMPRODUCT((ISNUMBER(D3100))*(J3:J100=10)*(G3:G 100=90),H3:H100)

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Steve" wrote:

This works great. Thank you.

However, I used a simple example. In reality,the J and G data had 5
variables each, so I was going to create tables such as
row G J
3 90 10
4 90 12
5 90 13
6 90 14
7 90 15
8 100 10
9 100 12
10 100 13
11 100 14
12 100 15, etc.
and use the formula not as specific numbers like 90 or 10, but use the cell
reference like G3 and J3. Where my problem comes is that the D column can be
various numbers up to appx. 200, so I'd like to be able to use in the formula
in place of D3100 =100, something that would use whatever is in that D
column. Is that possible ?

Thanks again,

Steve

"Ms-Exl-Learner" wrote:

Try this...

=SUMPRODUCT((D3100=100)*(J3:J100=10)*(G3:G100=90 ),H3:H100)

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Steve" wrote:

I need to add hours if 3 critera match.
In the below, if there is a 90 in the G column AND a 10 in the J Column, AND
a 100 in the D column, then add the H column. Being that this criterea is
found only in row 3 and row 6, I need the result to be 3 (H3 +H6).

row D G H J

3 100 90 2 10
4 200 100 3 11
5 300 110 4 12
6 100 90 1 10
7 200 90 5 10
8 300 90 6 13

Thanks,

Steve

  #7  
Old April 16th, 2010, 06:40 PM posted to microsoft.public.excel.worksheet.functions
Steve
external usenet poster
 
Posts: 2,662
Default If 3 If's, then sum

They are all working as designed, but I'm having difficulty being clear.
The D's are the variables that can be numerous, and can change daily.
I guess what I'm trying to say is that, e.g., if there is 100 in the D
then sum up those hours in H:H if they match 10 in J:J AND 90 in G:G.
However, they may also be 150 in D. And if so, then sum up those hours in
H:H if they match 10 in J:J AND 90 in G:G. And I need those numbers in D
identified as to what they are.

Thanks for your patience.

"Ms-Exl-Learner" wrote:

Not clear whether this is what you are looking for...

1st Formula:-
This will generate the result when D3100 is not blank and when its
matching other criteria
=SUMPRODUCT((D3100"")*(J3:J100=10)*(G3:G100=90 ),H3:H100)

2nd Formula:-
Or simply you can remove the D3100 criteria from the formula like the below
=SUMPRODUCT((J3:J100=10)*(G3:G100=90),H3:H100)

3rd Formula:-
This will generate the result when D3100 is having Numeric Values and when
its matching other criteria. This will leave the Text entries in D3100
eventhough the other criteria's are matching.
=SUMPRODUCT((ISNUMBER(D3100))*(J3:J100=10)*(G3:G 100=90),H3:H100)

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Steve" wrote:

This works great. Thank you.

However, I used a simple example. In reality,the J and G data had 5
variables each, so I was going to create tables such as
row G J
3 90 10
4 90 12
5 90 13
6 90 14
7 90 15
8 100 10
9 100 12
10 100 13
11 100 14
12 100 15, etc.
and use the formula not as specific numbers like 90 or 10, but use the cell
reference like G3 and J3. Where my problem comes is that the D column can be
various numbers up to appx. 200, so I'd like to be able to use in the formula
in place of D3100 =100, something that would use whatever is in that D
column. Is that possible ?

Thanks again,

Steve

"Ms-Exl-Learner" wrote:

Try this...

=SUMPRODUCT((D3100=100)*(J3:J100=10)*(G3:G100=90 ),H3:H100)

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Steve" wrote:

I need to add hours if 3 critera match.
In the below, if there is a 90 in the G column AND a 10 in the J Column, AND
a 100 in the D column, then add the H column. Being that this criterea is
found only in row 3 and row 6, I need the result to be 3 (H3 +H6).

row D G H J

3 100 90 2 10
4 200 100 3 11
5 300 110 4 12
6 100 90 1 10
7 200 90 5 10
8 300 90 6 13

Thanks,

Steve

  #8  
Old April 16th, 2010, 07:03 PM posted to microsoft.public.excel.worksheet.functions
Mitch
external usenet poster
 
Posts: 159
Default If 3 If's, then sum

Hi Steve,

If that is the case, you can use SUMIFS function.


D G H J GG JJ
100 90 2 10 90 10
200 100 3 11
300 110 4 12
100 90 1 10
200 90 5 10
300 90 6 13

=SUMIFS($H3:$H100,$G3:$G100,$GG$3,$J3:$J100,$JJ$3)

Place the result somewhere you will not paste over.

Hope this helps. Press Yes if it does.

Thanks,

Mitch


"Steve" wrote:

They are all working as designed, but I'm having difficulty being clear.
The D's are the variables that can be numerous, and can change daily.
I guess what I'm trying to say is that, e.g., if there is 100 in the D
then sum up those hours in H:H if they match 10 in J:J AND 90 in G:G.
However, they may also be 150 in D. And if so, then sum up those hours in
H:H if they match 10 in J:J AND 90 in G:G. And I need those numbers in D
identified as to what they are.

Thanks for your patience.

"Ms-Exl-Learner" wrote:

Not clear whether this is what you are looking for...

1st Formula:-
This will generate the result when D3100 is not blank and when its
matching other criteria
=SUMPRODUCT((D3100"")*(J3:J100=10)*(G3:G100=90 ),H3:H100)

2nd Formula:-
Or simply you can remove the D3100 criteria from the formula like the below
=SUMPRODUCT((J3:J100=10)*(G3:G100=90),H3:H100)

3rd Formula:-
This will generate the result when D3100 is having Numeric Values and when
its matching other criteria. This will leave the Text entries in D3100
eventhough the other criteria's are matching.
=SUMPRODUCT((ISNUMBER(D3100))*(J3:J100=10)*(G3:G 100=90),H3:H100)

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Steve" wrote:

This works great. Thank you.

However, I used a simple example. In reality,the J and G data had 5
variables each, so I was going to create tables such as
row G J
3 90 10
4 90 12
5 90 13
6 90 14
7 90 15
8 100 10
9 100 12
10 100 13
11 100 14
12 100 15, etc.
and use the formula not as specific numbers like 90 or 10, but use the cell
reference like G3 and J3. Where my problem comes is that the D column can be
various numbers up to appx. 200, so I'd like to be able to use in the formula
in place of D3100 =100, something that would use whatever is in that D
column. Is that possible ?

Thanks again,

Steve

"Ms-Exl-Learner" wrote:

Try this...

=SUMPRODUCT((D3100=100)*(J3:J100=10)*(G3:G100=90 ),H3:H100)

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Steve" wrote:

I need to add hours if 3 critera match.
In the below, if there is a 90 in the G column AND a 10 in the J Column, AND
a 100 in the D column, then add the H column. Being that this criterea is
found only in row 3 and row 6, I need the result to be 3 (H3 +H6).

row D G H J

3 100 90 2 10
4 200 100 3 11
5 300 110 4 12
6 100 90 1 10
7 200 90 5 10
8 300 90 6 13

Thanks,

Steve

  #9  
Old April 16th, 2010, 07:12 PM posted to microsoft.public.excel.worksheet.functions
Mitch
external usenet poster
 
Posts: 159
Default If 3 If's, then sum

Steve,

From my latest answer, you could also extend the two sumif criterias into a
arange like $GG3:$GG100 and $JJ3:$JJ100.

"Mitch" wrote:

Hi Steve,

If that is the case, you can use SUMIFS function.


D G H J GG JJ
100 90 2 10 90 10
200 100 3 11
300 110 4 12
100 90 1 10
200 90 5 10
300 90 6 13

=SUMIFS($H3:$H100,$G3:$G100,$GG$3,$J3:$J100,$JJ$3)

Place the result somewhere you will not paste over.

Hope this helps. Press Yes if it does.

Thanks,

Mitch


"Steve" wrote:

They are all working as designed, but I'm having difficulty being clear.
The D's are the variables that can be numerous, and can change daily.
I guess what I'm trying to say is that, e.g., if there is 100 in the D
then sum up those hours in H:H if they match 10 in J:J AND 90 in G:G.
However, they may also be 150 in D. And if so, then sum up those hours in
H:H if they match 10 in J:J AND 90 in G:G. And I need those numbers in D
identified as to what they are.

Thanks for your patience.

"Ms-Exl-Learner" wrote:

Not clear whether this is what you are looking for...

1st Formula:-
This will generate the result when D3100 is not blank and when its
matching other criteria
=SUMPRODUCT((D3100"")*(J3:J100=10)*(G3:G100=90 ),H3:H100)

2nd Formula:-
Or simply you can remove the D3100 criteria from the formula like the below
=SUMPRODUCT((J3:J100=10)*(G3:G100=90),H3:H100)

3rd Formula:-
This will generate the result when D3100 is having Numeric Values and when
its matching other criteria. This will leave the Text entries in D3100
eventhough the other criteria's are matching.
=SUMPRODUCT((ISNUMBER(D3100))*(J3:J100=10)*(G3:G 100=90),H3:H100)

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Steve" wrote:

This works great. Thank you.

However, I used a simple example. In reality,the J and G data had 5
variables each, so I was going to create tables such as
row G J
3 90 10
4 90 12
5 90 13
6 90 14
7 90 15
8 100 10
9 100 12
10 100 13
11 100 14
12 100 15, etc.
and use the formula not as specific numbers like 90 or 10, but use the cell
reference like G3 and J3. Where my problem comes is that the D column can be
various numbers up to appx. 200, so I'd like to be able to use in the formula
in place of D3100 =100, something that would use whatever is in that D
column. Is that possible ?

Thanks again,

Steve

"Ms-Exl-Learner" wrote:

Try this...

=SUMPRODUCT((D3100=100)*(J3:J100=10)*(G3:G100=90 ),H3:H100)

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Steve" wrote:

I need to add hours if 3 critera match.
In the below, if there is a 90 in the G column AND a 10 in the J Column, AND
a 100 in the D column, then add the H column. Being that this criterea is
found only in row 3 and row 6, I need the result to be 3 (H3 +H6).

row D G H J

3 100 90 2 10
4 200 100 3 11
5 300 110 4 12
6 100 90 1 10
7 200 90 5 10
8 300 90 6 13

Thanks,

Steve

  #10  
Old April 16th, 2010, 08:17 PM posted to microsoft.public.excel.worksheet.functions
Steve
external usenet poster
 
Posts: 2,662
Default If 3 If's, then sum

Sorry, I forgot to indicate that I'm using 2003, not 2007.

"Mitch" wrote:

Hi Steve,

If that is the case, you can use SUMIFS function.


D G H J GG JJ
100 90 2 10 90 10
200 100 3 11
300 110 4 12
100 90 1 10
200 90 5 10
300 90 6 13

=SUMIFS($H3:$H100,$G3:$G100,$GG$3,$J3:$J100,$JJ$3)

Place the result somewhere you will not paste over.

Hope this helps. Press Yes if it does.

Thanks,

Mitch


"Steve" wrote:

They are all working as designed, but I'm having difficulty being clear.
The D's are the variables that can be numerous, and can change daily.
I guess what I'm trying to say is that, e.g., if there is 100 in the D
then sum up those hours in H:H if they match 10 in J:J AND 90 in G:G.
However, they may also be 150 in D. And if so, then sum up those hours in
H:H if they match 10 in J:J AND 90 in G:G. And I need those numbers in D
identified as to what they are.

Thanks for your patience.

"Ms-Exl-Learner" wrote:

Not clear whether this is what you are looking for...

1st Formula:-
This will generate the result when D3100 is not blank and when its
matching other criteria
=SUMPRODUCT((D3100"")*(J3:J100=10)*(G3:G100=90 ),H3:H100)

2nd Formula:-
Or simply you can remove the D3100 criteria from the formula like the below
=SUMPRODUCT((J3:J100=10)*(G3:G100=90),H3:H100)

3rd Formula:-
This will generate the result when D3100 is having Numeric Values and when
its matching other criteria. This will leave the Text entries in D3100
eventhough the other criteria's are matching.
=SUMPRODUCT((ISNUMBER(D3100))*(J3:J100=10)*(G3:G 100=90),H3:H100)

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Steve" wrote:

This works great. Thank you.

However, I used a simple example. In reality,the J and G data had 5
variables each, so I was going to create tables such as
row G J
3 90 10
4 90 12
5 90 13
6 90 14
7 90 15
8 100 10
9 100 12
10 100 13
11 100 14
12 100 15, etc.
and use the formula not as specific numbers like 90 or 10, but use the cell
reference like G3 and J3. Where my problem comes is that the D column can be
various numbers up to appx. 200, so I'd like to be able to use in the formula
in place of D3100 =100, something that would use whatever is in that D
column. Is that possible ?

Thanks again,

Steve

"Ms-Exl-Learner" wrote:

Try this...

=SUMPRODUCT((D3100=100)*(J3:J100=10)*(G3:G100=90 ),H3:H100)

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Steve" wrote:

I need to add hours if 3 critera match.
In the below, if there is a 90 in the G column AND a 10 in the J Column, AND
a 100 in the D column, then add the H column. Being that this criterea is
found only in row 3 and row 6, I need the result to be 3 (H3 +H6).

row D G H J

3 100 90 2 10
4 200 100 3 11
5 300 110 4 12
6 100 90 1 10
7 200 90 5 10
8 300 90 6 13

Thanks,

Steve

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.