Conditional Formatting

Frank Harrison

New Member
Joined
Feb 8, 2023
Messages
11
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
I am looking to use conditional formatting to highlight a cell when a one in five rows condition is exceeded.

Order KeyVS-455
A04532X
A01323
A01022
A01331
A06877X Thid cell should highligrt red because there is an "X" Four rows above
A01003
A01922
A02403
A02740
A04565X
A01394
A01246
A07754
A01271
A09886X
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
You should be able to use a COUNTIF to count how many "X"s there are in the 4 rows above, and if it is more than 0, i.e. the Conditional Formatting formula would start in B6 and look like:
Excel Formula:
=COUNTIF(B2:B5,"X")>0
 
Upvote 0
Every time an "X" occurs I need it to evaluate the four cell above and below to make sure no othes rows contain an "X"
 
Upvote 0
OK, looks you conditions changed, as you now want to check above AN D below, instead of just below.

What row/column does your data actually start in?
 
Upvote 0
Sample file attached I think the rows above would nohave to be considered because they would be covered.
 

Attachments

  • Bom.jpg
    Bom.jpg
    59.1 KB · Views: 2
Upvote 0
What row/column does your data actually start in?
You did not answer my question, and your image does not show row or column headers, so I cannot see what ranges you are working with.
 
Upvote 0

Forum statistics

Threads
1,215,420
Messages
6,124,803
Members
449,190
Latest member
cindykay

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