First, thank you for the great help I always get on here.
I would like to average the values in row 7 if the value in row 8 is dog or horse.
I was trying =AVERAGEIF(A8:C8,"dog,cat",A7:C7)
Is there a way to do this?
Thanks again
sample.xls
First, thank you for the great help I always get on here.
I would like to average the values in row 7 if the value in row 8 is dog or horse.
I was trying =AVERAGEIF(A8:C8,"dog,cat",A7:C7)
Is there a way to do this?
Thanks again
sample.xls
Try
=SUM(SUMIF(A8:C8,{"dog","horse"},A7:C7))/SUM(COUNTIF(A8:C8,{"dog","horse"}))
FYI, you have a trailing space after dog in A8
THANKS! That worked perfect and if I want to add additional conditions it is easy to do so.
Great, glad to help.
Here's another one...
Array entered**:
=AVERAGE(IF(A8:C8={"dog";"horse"},A7:C7))
You would be better off using cells to hold the criteria:
A1 = dog
A2 = horse
Array entered**
=AVERAGE(IF(A8:C8=A1:A2,A7:C7))
** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks