how to change tab color

aguilar25

New Member
Joined
Oct 15, 2011
Messages
10
Hello,

I have this workbook that i would like to change the tab/sheet color to red every time i add data to the main page which is called Totals....can it be done? The formula I have is on Column C as it follows

='1123'!A11
='1124'!A11
='1125'!A11

and so on......oh I have the workbook protected so along with my question can it be changed will being protected or do i have to unprotect it?

....Thank you in advanced

Claudia
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
I'm a little confused. Once the tab changes to red, what action or logic would return it to its original color or would the tab remain red forever. Something is amiss here. Perhaps some more information is in order.
 
Upvote 0
Hi Alan, I want the tabs to stay red....they are invoices and the reason why I want them red is so that I can distinguish the used tabs and the empty ones, instead of searching for the next open invoice.
 
Upvote 0
As Andy Pope Said<!-- BEGIN TEMPLATE: postbit_onlinestatus --><!-- END TEMPLATE: postbit_onlinestatus -->******** type=text/javascript> vbmenu_register("postmenu_2155828", true); *********>

It will require code.
Right click sheet tab and pick View Code.

add this to the module.


<!-- BEGIN TEMPLATE: bbcode_code -->Code:
<STYLE>.alt2 FONT { FONT: 11px monospace; COLOR: #333 !important}</STYLE>
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Range("A1:B1"), Target) Is Nothing Then If Range("A1") = Range("B1") Then ActiveSheet.Tab.ColorIndex = 14 ElseIf Range("A1") > Range("B1") Then ActiveSheet.Tab.ColorIndex = 6 Else ActiveSheet.Tab.ColorIndex = xlNone End If End IfEnd Sub</PRE>
 
Upvote 0
Hello Wigi, I copied the macro and it worked but all the tabs changed to the normal blue color they dont change to red when the cells in column C have data, am i doing something wrong?
 
Upvote 0
Hello Wigi, I copied the macro and it worked but all the tabs changed to the normal blue color they dont change to red when the cells in column C have data, am i doing something wrong?

Hello

The code I linked you to, checks cell B1 in every sheet. Not column C.
 
Upvote 0

Forum statistics

Threads
1,203,761
Messages
6,057,215
Members
444,914
Latest member
Mamun12345

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