Sumifs??

pmpalma

New Member
Joined
Mar 26, 2013
Messages
16
Trying to get an average from two disctinct arrays when two conditions exist

For instance

=IF(SUM(WP6:XY6,YD6:YL6)>0,AVERAGE(WP6:XY6,YD6:YL6),"")

Which is fine, but I would like it to work when WP4:XY4 AND YD4:YL4 = to either CC or AB

Can someone please help out??

I've been banging my head on this bloody desk for the past three hours to no avail

Thx
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
See if this example helps

[Table="class: grid"][tr][td="bgcolor: #DCE6F1"][/td][td="bgcolor: #DCE6F1"]
A
[/td][td="bgcolor: #DCE6F1"]
B
[/td][td="bgcolor: #DCE6F1"]
C
[/td][td="bgcolor: #DCE6F1"]
D
[/td][td="bgcolor: #DCE6F1"]
E
[/td][td="bgcolor: #DCE6F1"]
F
[/td][td="bgcolor: #DCE6F1"]
G
[/td][td="bgcolor: #DCE6F1"]
H
[/td][td="bgcolor: #DCE6F1"]
I
[/td][td="bgcolor: #DCE6F1"]
J
[/td][td="bgcolor: #DCE6F1"]
K
[/td][td="bgcolor: #DCE6F1"]
L
[/td][td="bgcolor: #DCE6F1"]
M
[/td][td="bgcolor: #DCE6F1"]
N
[/td][td="bgcolor: #DCE6F1"]
O
[/td][/tr]
[tr][td="bgcolor: #DCE6F1"]
1
[/td][td][/td][td]
Result​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
2
[/td][td][/td][td]
7​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
3
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
4
[/td][td][/td][td]
AB​
[/td][td]
AC​
[/td][td]
CC​
[/td][td]
CB​
[/td][td]
CC​
[/td][td]
CC​
[/td][td][/td][td]
AB​
[/td][td]
AC​
[/td][td]
CC​
[/td][td]
CB​
[/td][td]
CB​
[/td][td]
CC​
[/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
5
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
6
[/td][td][/td][td="bgcolor:#FFFF00"]
3​
[/td][td]
10​
[/td][td="bgcolor:#FFFF00"]
8​
[/td][td]
5​
[/td][td="bgcolor:#FFFF00"]
4​
[/td][td="bgcolor:#FFFF00"]
3​
[/td][td][/td][td="bgcolor:#FFFF00"]
10​
[/td][td]
2​
[/td][td="bgcolor:#FFFF00"]
12​
[/td][td]
10​
[/td][td]
8​
[/td][td="bgcolor:#FFFF00"]
9​
[/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
7
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]


Formula in B2
=IF(SUM(B6:G6,I6:N6)>0,SUM(SUMIF(B4:G4,{"AB";"CC"},B6:G6),SUMIF(I4:N4,{"AB";"CC"},I6:N6))/SUM(COUNTIF(B4:G4,{"AB";"CC"}),COUNTIF(I4:N4,{"AB";"CC"})),"")

M.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top