sheet tab color change macro

kendel

Board Regular
Joined
Mar 2, 2010
Messages
133
Hello, I'm using Excel 2007 and Windows XP

Basically I'd like to change or not change the sheet tab color automatically dependent on a cell's content or lack of content.

I'm using an IF formula that enters a "1" or it remains an empty cell. I want to change that sheet tab color depedent on the "1", say green and no change for the blank. I would like the macro to be run automatically when the cell is populated. The sheet is used to record data by the Data Entry dept and several cells contain formulas based on the data. When bad data is entered, the cell that contains the IF formula will display the 1.

When I open the workbook I'll be able to see at a glance which sheets need attention and correct the bad data.

Thanks for any help with this as I have no idea how this could be done.
Kendel
 
at the start of the macro

Code:
Dim calcsetting
calcsetting = Application.Calculation
Application.Calculation = xlCalculationAutomatic



and this to the end of that same macro


Code:
Application.Calculation = calcsetting
 
Last edited:
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
If that doesnt do it...

You could try throwing in
Application.Calculate before the code runs...
 
Upvote 0
Thank you both SO much for helping me with this.

tygrrboi - your additional code suggestion in post #31 worked. When I click the button now everything just works.
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,361
Members
449,080
Latest member
Armadillos

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