user3352949
user3352949

Reputation: 63

Writing AVERAGEIF Statement in Excel over different columns with different criteria

I'm new to Excel IF statements and am having trouble with what I believe is called a nested IF function. I've looked at other IF questions on here and couldn't figure it out.

I have two columns that have numbers in it and the rest are text.I need to create an IF statement that will tell me what the average is based on different combinations of the text and numbers. I have thousands of rows to filter through and I don't want to do them manually if the function exists to automate it in Excel.

B=iPhone C=5S D=Verizon E=64 F=Normal H=380

I currently have written an IF statement that finds me the average of all prices on iPhones

=AVERAGEIF(B1:H3792,"=iPhone",H1:H3792)

I would like to make it so the statement allows me to enter more than one criteria. What I mean more clearly is that I currently only have "iPhone" as a criteria, but would like to have another for "5S", "Verizon", "64" and "Normal".

Upvotes: 0

Views: 306

Answers (1)

Dmitry Pavliv
Dmitry Pavliv

Reputation: 35863

1) your ranges B1:H3792 and H1:H3792 should have same dimmention. Change B1:H3792 to B1:B3792

2) for more criterias you can use AVERAGEIFs:

=AVERAGEIFs(H1:H3792,B1:B3792,"iPhone",C1:C3792,"5S",D1:D3792,"Verizon",E1:E3792,64,F1:F3792,"Normal")

Upvotes: 1

Related Questions