Conditional Tab Color

hedgie

Board Regular
Joined
Jun 23, 2004
Messages
174
Office Version
  1. 365
Platform
  1. Windows
Actually a two part question. One sheet in a workbook is a testing sheet to see if certain conditions are met. I would like to have the Tab color turn Red if any of the Conditions are present. Currently the sheet has conditional formating for each condition and sets the color to yellow within the cell that is meeting that particular condition. 1) is there a way to populate a test cell that will put a "1" in place if any of the other cells are yellow. 2) if that test cell has a 1, have the tab color change to red?
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi,

1. CELL = 1
you will need to use the formulas from conditional format
this is the only way to "see" if the cells are yellow
2. TABcolor
Code:
Private Sub Worksheet_Calculate()
Me.Tab.ColorIndex = IIf(Range("A1") = 1, 3, -4142)
End Sub
http://www.cpearson.com/excel/events.htm
TO INSTALL IN SHEET CODE WINDOW:
1. right click the "Name Tab" of sheet you want code to work in
2. Select "View Code" in drop down menu
3. VBE window will open ... paste code in and exit VBE

kind regards,
Erik
 
Upvote 0

Forum statistics

Threads
1,214,806
Messages
6,121,672
Members
449,045
Latest member
Marcus05

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