Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default If a cell is modified after a date; font color change indicate

In XLS, if a cell value is changed after a fixed date can the font color be
directed to change in order to indicate this.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid
 
Posts: n/a
Default If a cell is modified after a date; font color change indicate

Right-click on the sheet tab to display VBA code for the sheet. Then
paste the following code and change the range of cells and the date as
needed.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim MonitoredRange As Range
Dim LimitDate As Date
Dim inter As Range

Set MonitoredRange = Range("A1") 'You can change this to an array, e.g.
Range("A1:A10")
LimitDate = "11/15/2005"

Set inter = Application.Intersect(MonitoredRange, Target)
If (Not inter Is Nothing) And (Now Int(LimitDate)) Then
Target.Font.ColorIndex = 3
End If

End Sub

HTH
Kostis Vezerides

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
if data in one cell, then date in adjacent cell Jane Excel Worksheet Functions 8 December 22nd 07 03:34 AM
Change cell to red when date in other cell is red cityfc Excel Discussion (Misc queries) 3 November 10th 05 10:27 PM
extract name when a date in another cell gets near cityfc Excel Worksheet Functions 5 November 10th 05 01:20 AM
formula to calculate future date from date in cell plus days Chicesq Excel Worksheet Functions 8 November 3rd 05 12:25 PM
Using formulas to determine date in one cell based on date in anot Gary Excel Worksheet Functions 2 November 22nd 04 08:11 AM


All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"