Cell changing color if updated within the las
Solved/Closed
haros
-
Jun 9, 2010 at 06:42 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jun 11, 2010 at 08:16 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jun 11, 2010 at 08:16 AM
Related:
- Cell changing color if updated within the las
- Notepad++ change background color - Guide
- Sound card color code - Guide
- Rg45 color coding - Guide
- Powertoys color picker download - Download - Other
- Html text color - Guide
2 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jun 9, 2010 at 07:13 AM
Jun 9, 2010 at 07:13 AM
Yes you can do it but for that you have to use
Worksheet_change event of the sheet where you want this to occur. There you have to create the conditional format so that dates are hard coded. If you want to see how to do it, use macro recorder to create conditional formatting, that will give you the code
Worksheet_change event of the sheet where you want this to occur. There you have to create the conditional format so that dates are hard coded. If you want to see how to do it, use macro recorder to create conditional formatting, that will give you the code
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jun 11, 2010 at 07:55 AM
Jun 11, 2010 at 07:55 AM
Try this
1. Press ALT + F11 to start VBE
2. Press CTRL + R to launch Project Viewer
3. Double click on you sheet where you want to highlight. In your sample that would be sheet1
4. Paste the code below
Note:
Today is June 11, 2010. So till June 21, 2010 (including), the cell would be blue
1. Press ALT + F11 to start VBE
2. Press CTRL + R to launch Project Viewer
3. Double click on you sheet where you want to highlight. In your sample that would be sheet1
4. Paste the code below
Private Sub Worksheet_Change(ByVal Target As Range) Dim Cell As Range For Each Cell In Target With Cell If ((.Row > 3) And (.Column = 12)) Then .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, _ Formula1:="=""" & (Date + 10) & """ >= Today()" .FormatConditions(1).Interior.ColorIndex = 41 End If End With Next Cell Set Cell = Nothing End Sub
Note:
Today is June 11, 2010. So till June 21, 2010 (including), the cell would be blue
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jun 11, 2010 at 08:16 AM
Jun 11, 2010 at 08:16 AM
That's great. Congrats!!
Just make sure you test it by changing the system date of your PC to ensure that it is working as I think it is working. I would change it to date before today and +9, +10, +11 day from today, to make sure it is working. I am sorry but this PC is dead slow and takes for ever to start launch any application. If it does not now work, let me know.
Just make sure you test it by changing the system date of your PC to ensure that it is working as I think it is working. I would change it to date before today and +9, +10, +11 day from today, to make sure it is working. I am sorry but this PC is dead slow and takes for ever to start launch any application. If it does not now work, let me know.
Jun 10, 2010 at 09:11 AM
But can you be a bit more detailed as I quite new at excel?! :(
Jun 10, 2010 at 11:05 AM
Jun 10, 2010 at 02:49 PM
Jun 10, 2010 at 04:30 PM
Jun 11, 2010 at 07:33 AM
I understand. Please find above the link.