PC Review


Reply
 
 
=?Utf-8?B?QUFNSUZD?=
Guest
Posts: n/a
 
      12th Oct 2007
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.


 
Reply With Quote
 
 
 
 
marcus
Guest
Posts: n/a
 
      12th Oct 2007
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 With Quote
 
=?Utf-8?B?QUFNSUZD?=
Guest
Posts: n/a
 
      15th Oct 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Validation lists update orginal cell with list update roniaelm@hotmail.com Microsoft Excel Worksheet Functions 3 11th Jul 2008 07:56 AM
Update Excel cell in formula not refreshing answer cell =?Utf-8?B?Sm9obm55?= Microsoft Excel Misc 2 21st Jun 2007 05:49 AM
auto-hide rows, cell format (# and @), update cell refs, shade cel =?Utf-8?B?TW8y?= Microsoft Excel Misc 0 17th Apr 2007 03:44 AM
Populating Last Saved Date in Cell AND also update that same cell in Header o0o_Bigs_o0o Microsoft Excel Misc 2 4th Jul 2006 12:56 PM
How to dynamically update an external Excel sheet cell by cell =?Utf-8?B?WGlu?= Microsoft Access Form Coding 9 25th May 2006 07:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:58 AM.