AverageIf

Noz2k

Well-known Member
Joined
Mar 15, 2011
Messages
693
Need a little help putting a clause into my averageif statement.

The problem I'm encountering is that some cells in my average range have "-" in them rather than a number. What I would like to do is to not include these in my average.

The current formula is

Code:
=AVERAGEIF(Sheet1!$Q$2:$Q$2083,"="&$B45,Sheet1!$V$2:$V$2083)

where B45 = 0
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
BTW, the "="& is unnecessary, if not specified, equal is the default.
 
Upvote 0
Thanks for the replies.

The reason it didn't work initially was because was because there weren't any occurances of 0 in the data.

It's good to know that the "-" is not counted though, as it means I can sort the table in other ways without affecting the data.

and I wasn't aware that was the default, thanks for letting me know.
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

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