Conditional Formatting

Dhinakaran

New Member
Joined
Mar 30, 2016
Messages
48
Office Version
  1. 365
  2. 2021
  3. 2016
Platform
  1. Windows
Hi,

From the below table, we have a 0(Zero's) repeated on multiple occasions and I wish to highlight the same basis the below conditions.

1. One instance of 0 should be highlighted in Yellow (under rows).
2. More than 1 instance of consecutive 0's to be highlighted in Red (under rows).

However the same couldn't be done using the conditional formatting, Hence seek assistance for the same.

Book1
ABCDEF
1DATE03-Jan04-Jan05-Jan06-Jan07-Jan
2AKLUJ0200.6400764.09
3AMBAJOGAI (BEED-DISTRICT)00000
4BAGALKOT99.8200189.46779.07
5BANGARPET482.821540.88129.03922.31267.17
6BG KERE1690.97116.21648.27177.15931.53
7CHANNARAYAPATNA0429.96001144.99
Sheet1
 
If our interpretation of the requirement is the correct one then here is a much simpler way than my previous one, and also does not require MS365.
Also a check in case a single cell happens to be blank, not zero.

22 02 07.xlsm
ABCDEF
1DATE3-Jan4-Jan5-Jan6-Jan7-Jan
2AKLUJ0200.6400764.09
3AMBAJOGAI (BEED-DISTRICT)00000
4BAGALKOT99.8200189.46779.07
5BANGARPET482.821540.88129.03922.31267.17
6BG KERE1690.97116.21648.27177.15931.53
7CHANNARAYAPATNA0429.96001144.99
8ABC5550
CF0 (2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:F8Expression=FIND("|0|0|","|"&A2&"|"&B2&"|"&C2&"|")textNO
B2:F8Expression=B2&""="0"textNO
Hi Peter,

Thanks for your solution. Did imply the same in my data, However the there seems to be some error as cell H4, K4, F2 and H7 are incorrectly highlighted. Not sure if i'm missing something. Please guide.

Conditional format sample.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
1#ManagerZoneCenter01-Feb02-Feb03-Feb04-Feb05-Feb06-Feb07-Feb08-Feb09-Feb10-Feb11-Feb12-Feb13-Feb14-Feb15-Feb16-Feb17-Feb18-Feb19-Feb20-Feb21-Feb22-Feb23-Feb24-Feb25-Feb26-Feb27-Feb28-Feb
2Total
3SubTotal
41JohnWestCA1000101001100010100110001010
52DavidSouthLA0101010110010101011001010101
63JohnWestCA0011010011001101001100110100
74ChristNorthPH1000101100100010110010001011
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E4:AF7Expression=FIND("|0|0|","|"&E4&"|"&F4&"|"&G4&"|")textNO
E4:AF7Expression=E4&""="0"textNO
 
Upvote 0

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
You are referencing the wrong cells with the 'red' formula. The first one should reference D4, E4 & F4

22 02 07.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
41JohnWestCA1000101001100010100110001010
52DavidSouthLA0101010110010101011001010101
63JohnWestCA0011010011001101001100110100
74ChristNorthPH1000101100100010110010001011
CF0 (3)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E4:AF7Expression=FIND("|0|0|","|"&D4&"|"&E4&"|"&F4&"|")textNO
E4:AF7Expression=E4&""="0"textNO
 
Upvote 0
Solution

Forum statistics

Threads
1,215,014
Messages
6,122,697
Members
449,092
Latest member
snoom82

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