Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Update
Hi
I am trying to put together a worksheet where the user would enter the date in Cell A1 - format of 01/01/07 and cell A2 returns the day of the week "MON". This is fine - what I need to do now is check that A2 = "Mon" and A3 = "Demo" then change the font colour. I can do the if statement, however am unable to workout how I can detect when cell A2 is updated. Thanks in advance for any help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Update
Hi
This should do the trick. Just put this code in the sheet module ie Sheet1. It colours A1 in Red if the cell changes and Cells A2 and A3 = Mon and Demo respectively. Adjust colours and values to suit. Take care Marcus Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Address = "$A$1" Then If Range("A2").Value = "Mon" And Range("A3").Value = "Demo" Then Range("A1").Font.ColorIndex = 3 End If End If End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Update
thanks - worksheet is now working with this code.
Frank "marcus" wrote: Hi This should do the trick. Just put this code in the sheet module ie Sheet1. It colours A1 in Red if the cell changes and Cells A2 and A3 = Mon and Demo respectively. Adjust colours and values to suit. Take care Marcus Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Address = "$A$1" Then If Range("A2").Value = "Mon" And Range("A3").Value = "Demo" Then Range("A1").Font.ColorIndex = 3 End If End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Data Validation lists update orginal cell with list update | Excel Worksheet Functions | |||
Update Excel cell in formula not refreshing answer cell | Excel Discussion (Misc queries) | |||
auto-hide rows, cell format (# and @), update cell refs, shade cel | Excel Discussion (Misc queries) | |||
Populating Last Saved Date in Cell AND also update that same cell in Header | Excel Discussion (Misc queries) | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions |