color tabs for multiple dates

bullarma

New Member
Joined
Jan 3, 2024
Messages
3
Platform
  1. Windows
I'm not too tech savvy for starters.

I have an excel workbook that has over 100 plus tabs. each tab has a customer with numerous units that need preventative maintenance done on them with a date for the next maintenance date. what is the code that can change the tab color from white to yellow(1 month to due) to red (overdue). each customer has numerous units that have different periodicities for maintenance (annual, semi-annual, quarterly).


thanks in advance.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Does each worksheet (tab) have the same format?
What data does it have, in what format?
How can you determine, based on data in the worksheet, what the next maintenance date is?

The strategy is going to be to have code loop through all the worksheets and check this for each one but you haven't given enough detail to provide any actual code.
 
Upvote 0
same data format for the most part. its things like serial number and if it is a quarterly, semi or annual maint. the due date is manually inputted into a cell. so one cell will say next due date 10/2024 and when it becomes 08/2024 i want the tab to turn yellow and when it turns 10/2024 to turn red. im sure i will have to put the code into each tab due to different tabs having between 2 and 16 different due dates on it all at different cell locations. but if there is a code for one cell i can just add it too the rest of them no?
 
Upvote 0
This is not nearly enough detail to write code. You have to specific exactly what data is in exactly what cells on exactly which sheets.

same data format for the most part.
OK good, but
different tabs having between 2 and 16 different due dates on it all at different cell locations.
Oh, then they are not the same data format.

The code will have to be specific to each sheet. With 100 sheets that may not be practical unless there is some pattern or system to how you have the dates. A sample would go a long way towards solving this.

And how do you decide what color to make the tab when there are multiple due dates on a sheet?
 
Upvote 0
okay...again im not tech savvy so i apologize. one example would be something like. customer X has unit A that is due in oct-2024 unit B that is due in mar-2024 and unit C that is due in dec-2024. when one of those dates in a certain cell gets 2 months away it turns yellow. is there not a code or function i can put into each individual cell that has a date? so that when one of the dates get close the whole workbook tab will turn a certain color?
 
Upvote 0
im not tech savvy so i apologize
Yeah, I'm trying not to get too technical, but either the sheets are in the same format, or they are not.
is there not a code or function i can put into each individual cell that has a date?
Yes. Conditional Formatting can change the color of any cell based on condition, such as today's date being past the date in the cell.
so that when one of the dates get close the whole workbook tab will turn a certain color?
No. Not unless you specify what data is in exactly what cells on exactly which sheets.
 
Upvote 0

Forum statistics

Threads
1,223,608
Messages
6,173,325
Members
452,510
Latest member
RCan29

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