# Average on conditional formatted cells

##### New Member
Hi all
I need some help
Like when true - mark as bold or mark with a blue background.
Now I would like to do some calculations based on those rules.
For example, I need to calculate the average of all bolded cells (and only the bolded cells)
Can it be done and how?

### Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

#### gaz_chops

##### Well-known Member
Try using the same conditions as your conditional formatting in an averageif(s) formula.

##### New Member
Thanks
But can you show me an example?
If this is my rule:=AND(\$B5>65,\$O5<100)
But it applied on: =\$B\$5:\$AS\$2021

I've never used averageif and not sure how to use it

Thanks

#### gaz_chops

##### Well-known Member
Try this array formula

=AVERAGE(IF(\$B\$5:\$B\$2021>65,IF(\$O\$5:\$O\$2021<100,\$B\$5:\$AS\$2021)))

enter using Ctrl, shift & enter

Replies
5
Views
316
Replies
3
Views
51
Replies
1
Views
326
Replies
2
Views
58
Replies
3
Views
71

1,196,016
Messages
6,012,865
Members
441,737
Latest member
bijayche

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