# Domenic - help!

#### rushthecourt

##### New Member
Hello again -

I've almost gotten my database where I want it, thanks to much of your assistance the last couple of weeks. I very much appreciate it.

As I was auditing some formulas today, I came across an oversight that has to do with my averaging formulas.

I have a formula like this:

=AVERAGE(IF(\$C\$4:\$C\$4995="x",\$K\$4:\$K\$4995))

This formula's problem is that it is not accounting for instances where there is an X in column C, but K is blank. The excel sheet is averaging K in that instance as if it had a "0" within.

Another example is this:

=AVERAGE(IF(\$C\$4:\$C\$4995="x",IF(\$H\$4:\$H\$4995<0,\$o\$4:\$o\$4995)))

Again, any time there is an X in column C & H>0, it is averaging every according cell in column o - including those that are blank. It should only be averaging those with a value in column o (fitting the two criteria of course).

Thanks again for all your help!

RTC

### Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

#### barry houdini

##### MrExcel MVP
You can try adding an extra criterion, e.g.

=AVERAGE(IF(\$C\$4:\$C\$4995="x",IF(ISNUMBER(\$K\$4:\$K\$4995),\$K\$4:\$K\$4995)))

and similarly for your second formula

Replies
1
Views
340
Replies
2
Views
216
Replies
10
Views
298
Replies
12
Views
398
Replies
2
Views
116

1,191,194
Messages
5,985,220
Members
439,948
Latest member
Xearo96

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