Conditional formatting based on levels

nemmi69

Well-known Member
Joined
Mar 15, 2012
Messages
938
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
So
1, 2, 3 etc. is a top level task
1.1, 2.1, 3.1 etc. is the next level down
1.1.1, 2.1.1, 3.1.1 etc. is the lowest level

How do I get the conditional formatting to colour as below?

1677158535972.png
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Use this formula to get the number of "."
Excel Formula:
=LEN(C25)-LEN(SUBSTITUTE(C25,".",""))
Use that in conditional formatting.
 
Upvote 0
How do you apply that for each of the level/colours?
 
Upvote 0
for dark blue:
Excel Formula:
=LEN(C25)-LEN(SUBSTITUTE(C25,".",""))=0

for lighter blue:
Excel Formula:
=LEN(C25)-LEN(SUBSTITUTE(C25,".",""))=1

for still lighter blue:
Excel Formula:
=LEN(C25)-LEN(SUBSTITUTE(C25,".",""))=2
 
Upvote 0
Solution
MrExcelPlayground15.xlsx
CD
251Thing
261.1Subthing
271.2Subthing
281.2.1Double Subthing
292Thing
302.1Subthing
312.1.1Double Subthing
Sheet29
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C25:D31Expression=LEN($C25)-LEN(SUBSTITUTE($C25,".",""))=2textNO
C25:D31Expression=LEN($C25)-LEN(SUBSTITUTE($C25,".",""))=1textNO
C25:D31Expression=LEN($C25)-LEN(SUBSTITUTE($C25,".",""))=0textNO
 
Upvote 0

Forum statistics

Threads
1,215,101
Messages
6,123,096
Members
449,096
Latest member
provoking

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