ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   can macros change cell color daily, i.e. green to red everyday? (https://www.excelbanter.com/excel-worksheet-functions/36283-can-macros-change-cell-color-daily-i-e-green-red-everyday.html)

ed

can macros change cell color daily, i.e. green to red everyday?
 
I want to change the colors of a cell on a daily basis. If I turn the cell
green on Monday, I want it to be orange on Tuesday and red on Wednesday,
unless I turn it green again, then repeat the process. Is this possible?

Jim Nicholls



"ed" wrote:

I want to change the colors of a cell on a daily basis. If I turn the cell
green on Monday, I want it to be orange on Tuesday and red on Wednesday,
unless I turn it green again, then repeat the process. Is this possible?


Maybe not the best way but it works.
In cell A1, enter =Today()
In cell A2, enter =Weekday(A1) *This will increment 1-7 (1 being Sunday)
In cell A3, goto Format/Conditional Formatting

In condition 1, change the entry in the dropdown list to "Formula Is". It
the txtbox next to this, type =$A$2=1and then click on the format button to
choose your colours.

Repeat this for every day of the week (1-7). The format of A3 should change
everyday.

Let me know if it works!

James Nicholls


All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com