Conditonal Format Tab Color Depending On Contents of a Column

didymus717

New Member
Joined
Apr 24, 2018
Messages
3
Hoping someone can help me out here. I have a workbook with multiple worksheets and would like the worksheet TAB COLOR to be conditionally formatted due to the contents of the cells in a particular column. (The particular column may be different depending on the worksheet).

For example:
Sheet TestVBA, Cell A1 = DATE, Cells A2-A26 contains dates (the cell may be blank if there is no date entered). The cells have conditional formatting applied to color the cell a specific color depending on the data entered.


  • If Blank Cell Color = NONE
  • If Cell Value between Today() and Today()-1000 then Cell Color = GREEN
  • If Cell Value between Today()-1000 and Today()-1065 then Cell Color = YELLOW
  • If Cell Value between Today()-1065 and Today()-1095 then Cell Color = ORANGE
  • If Cell Value '<'Today()-1095 then Cell Color = RED
(I had to enter quotes around the LESS THAN symbol to get the rest of the line to appear above. There are no actual quotes in the code.)​
<today()-1095 color="RED<today()-1095" cell="" then=""></today()-1095>​

The worksheet TAB COLOR.


  • If A2-A26 are all GREEN then TAB COLOR = GREEN
  • If any A2-A26 are YELLOW or ORANGE then TAB COLOR = YELLOW
  • If any A2-A26 are RED or BLANK then TAB COLOR = RED

:banghead:
Any and all input will be greatly appreciated.

Gary
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
This would have to be done via VBA, is that what you mean by Conditional Formatting ?
 
Upvote 0
Yes, I should have mentioned that I realize it would need to be VBA. The Conditional Formatting works great for the cell coloring for sure. I know a bit about coding but not sure where to start or where to enter the code.

Thanks,

Gary
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

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