View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Brian B. Brian B. is offline
external usenet poster
 
Posts: 12
Default RUN MACRO WHEN CELL IN COLUMN CHANGES VALUE

On Apr 8, 2:06*pm, wrote:
I am trying to run a macro when any cell in column 14 is less than or
equal to Today. Can anyone help?


There are a bunch of different ways to do this but this is a really
basic macro that works.

You might want to associate it with a SelectionChange event as opposed
to a Change event because this macro will continually run every time
the worksheet is re-calculated and there is a date greater than today
in column 14.

- - - - - - - -

Private Sub Worksheet_Change(ByVal Target As Range)

For i = 1 To 65000
If IsDate(Cells(i, 14)) And Cells(i, 14) Now Then
MsgBox "Macro!"
Exit Sub
End If
Next i

End Sub

- - - - - - - -