Need help with cell highlight

noobsaibotcore

New Member
Joined
Oct 9, 2021
Messages
7
Office Version
  1. 2019
Platform
  1. Windows
Hi all, need help with cell conditional highlight.

- If CELL B4 to B8 have the text "Y" or "N/A", CELL A1 to be highlighted in green.
- If any from CELL B4 to B8 is not "Y" or "N/A", CELL A1 to be highlighted in yellow.
- If any from CELL B4 to B8 is blank, CELL A1 have no highlight.

Capture.JPG
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Try setting the rules as below, make sure that the rule for the green highlight it at the top.
Book1
A
1
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1Expression=COUNTIF(B4:B8,"Y")+COUNTIF(B4:B8,"N/A")=5textNO
A1Expression=COUNTA(B4:B8)=5textNO
 
Upvote 0
Thanks, it works.

Possible to get,
- If any from CELL B4 to B8 is blank, CELL A1 have no highlight.
 
Upvote 0
Do you have formulas in B4:B8?

If the cells are empty (no formulas) then a blank cell would cause A1 to revert to default state (no highlight). A formula would mean that it is counted, so you would need to change the formula for the yellow rule to
Excel Formula:
=COUNTIF(B4:B8,"?*")=5
 
Upvote 0
If the cells are empty then there will be no highlight. You don't need to use a rule for that.
 
Upvote 0
1. - If CELL B4 to B8 have the text "Y" or "N/A", CELL A1 to be highlighted in green. < This works.

captureaa-jpg.48718


2. - If any from CELL B4 to B8 is not "Y" or "N/A", CELL A1 to be highlighted in yellow. < Does not work.

Capturebb.JPG


3. - If any from CELL B4 to B8 is blank, CELL A1 have no highlight. < This works.

Capturecc.JPG
 

Attachments

  • Captureaa.JPG
    Captureaa.JPG
    20.4 KB · Views: 15
Upvote 0
If you have done as instructed in post 2 then it works correctly. I can't see from your screen captures what the problem is because they only show the final sheet, not how you have set the rules up.

Edit:- I've just noticed the difference. In the second image, B8 is blank so there is no highlight.

You asked for no highlight if 'Any' cell is blank, which is what I provided. Your images suggest that it should be no highlight if 'All' cells are blank, not 'Any'. Please clarify which is actually required, the answers we give you are only as good as the questions you ask.

You could try changing the yellow rule to
Excel Formula:
=COUNTA(B4:B8)
(removing the =5 from the end). This may or may not give you what you need depending on the accuracy of the other information that you have provided.
 
Last edited:
Upvote 0
Solution

Forum statistics

Threads
1,214,406
Messages
6,119,330
Members
448,888
Latest member
Arle8907

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