Conditional Formatting with Formula

FanofExcel18

Board Regular
Joined
Jun 7, 2018
Messages
65
I'm attempting to do a conditional format based on a formula.

Row of data, B2:AC2

I would like to take the Average then have the cells highlight based less the Average. Lastly, I want to ignore 0.

Example: Average is 20
Anything less than 20 is highlighted and anything 0 is not highlighted.

=IF((AVERAGE(B$2:AC$2)<B$2:AC$2,5) -- This was my attempt but it doesn't work.

Appreciate any help.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
You can use
=AND(B$2"<" AVERAGE(B$2:AC$2<average(b$2:ac$2),b$2<>),B$2"<>"0)

This should give TRUE when it is less than the average and also not ZERO and give FALSE if the opposite

The QUOTES there are just because the site seems to have some issues with the Less than and Not equal to Signs</average(b$2:ac$2),b$2<>
 
Last edited:
Upvote 0
You can use
=AND(B$2"<" AVERAGE(B$2:AC$2<average(b$2:ac$2),b$2<>),B$2"<>"0)

This should give TRUE when it is less than the average and also not ZERO and give FALSE if the opposite

The QUOTES there are just because the site seems to have some issues with the Less than and Not equal to Signs</average(b$2:ac$2),b$2<>

Thank you; its not highlighting the 0's but the Average is not working. Its highlighting items from 8 to 13 to 36. The average is 16.
 
Upvote 0
Thank you; its not highlighting the 0's but the Average is not working. Its highlighting items from 8 to 13 to 36. The average is 16.
Thats because of how the references are structured, absolute .......Adjust the dollar signs to look like below

UNTESTED:
=AND(B$2"<" AVERAGE($B$2:$AC$2<average(b$2:ac$2),b$2< style="color: rgb(51, 51, 51); font-style: italic; background-color: rgb(242, 246, 248);">),B$2"<>"0)</average(b$2:ac$2),b$2<>
 
Upvote 0
Thats because of how the references are structured, absolute .......Adjust the dollar signs to look like below

UNTESTED:
=AND(B$2"<" AVERAGE($B$2:$AC$2<average(b$2:ac$2),b$2< style="color: rgb(51, 51, 51); font-style: italic; background-color: rgb(242, 246, 248);">),B$2"<>"0)</average(b$2:ac$2),b$2<>


YES!!!! Thank you!
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,620
Latest member
dsubash

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