Automatically changing the colour on a cell based on the date (code in macro)

ishkarayil

New Member
Joined
Jul 2, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am new to macro. please help me to code the following requirement
1) I have dates available in cell C5 to C148
2) when date mentioned in cell C5 appears, cell K7=yellow, L7=Red, M7=green
3) when date mentioned in cell C6 comes, cell K8=blue, L7=brown, M7= pink

the above condition is an example only and based on your input I will modify it as required. your support is highly appreciated.
Please note: All these data should run automatically once the Excel is opened with a delay of 1Sec in changing the date
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
I would use conditional formatting for what you are asking instead of a macro:
1719937062811.png
 

Attachments

  • 1719936944036.png
    1719936944036.png
    49.2 KB · Views: 18
Upvote 0
thanks for your reply...I tried conditional formatting earlier. but i could not find auto changing of the date & colour. need to select the date manually to find the corresponding cell activity. i am attaching a screenshot which is a smaller version of what i am trying to execute.
Condition is;
1) The date in column 'A' need to change automatically one-by-one, highlighting the coloured cell (respective team in my example) once the excel file is opened.
 

Attachments

  • Excel-productivity.JPG
    Excel-productivity.JPG
    45.1 KB · Views: 27
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,184
Members
452,615
Latest member
bogeys2birdies

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