# Average with two criteria

#### swaink

##### Active Member
Hi All

I am struggling with an average formula and just can't seem to solve it so may I ask for some assistance please.

I am trying to find the average of column Q where C & X meet values in my active sheet (Sheet1) Cell A5 and Cell D2

Column C contains reference numbers some prefixed zero and Column X contains the first four characters of the UK postcode, Column Q contains number values

=AVERAGE(IF('RAW Data'!\$C\$2:\$C\$5505=A5,IF('RAW Data'!X2:X5505=D2,""),'RAW Data'!\$X\$2:\$X\$5505))

Can you advise where my formula is failing me

Regards

Kevin

### Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

#### Jonmo1

##### MrExcel MVP
=AVERAGE(IF('RAW Data'!\$C\$2:\$C\$5505=A5,IF('RAW Data'!X2:X5505=D2,""),'RAW Data'!\$Q\$2:\$Q\$5505))

Confirmed with CTRL + SHIFT + ENTER

#### swaink

##### Active Member
Hi jonmo1

Thats work fine and I can now see where I was failing too. Its been a long day

Thank you

Kevin

Replies
1
Views
224
Replies
4
Views
722
Replies
1
Views
472
Replies
5
Views
727
Replies
1
Views
1K

1,191,124
Messages
5,984,784
Members
439,911
Latest member
dk73

### 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.

### Which adblocker are you using?

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

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