LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pro-actively run formula


Hi all, hope all is well with you.
I have two cells, one in which the user enters a date and the adjacen
one adds 21 days to that date to give a deadline.

What I got from one of the earlier threads is a way to conditionall
format the deadline cell so that if the deadline is less than now(
then change the font to red (I can't use the conditional forma
function as I've used all three queries already!).

The code is:

Code
-------------------

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "E:E"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
Select Case .Value
Case Is < Now(): .Font.ColorIndex = 3 'red
Case Is Now(): .Font.ColorIndex = 1 'yellow
End Select
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

-------------------


However, the problem is that the formula is only ran -after- text ha
been entered! That doesn't work for me since the deadline will expir
in 21 days, not the day the text is entered

How can I run the formula on the entire column as soon as the exce
form is opened or every set time or something?

Thanks very much

--
BravoGol

-----------------------------------------------------------------------
BravoGolf's Profile: http://www.excelforum.com/member.php...fo&userid=1475
View this thread: http://www.excelforum.com/showthread.php?threadid=46881

 
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
take spreadsheet to laptop and actively check boxes with pen Jcahill Excel Discussion (Misc queries) 3 October 2nd 07 05:47 PM
Using Excel as an actively linked workbook in Access John_A Excel Worksheet Functions 0 January 11th 07 07:04 PM
Actively update macro reference? Jennifer Bastin Excel Programming 2 June 22nd 04 03:48 PM
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 08:10 PM.

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"