Thread: Dates
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Dates

You need a worksheet change function use the one below

to Install
1) copy code below from the word SUB to the last line END SUB.
2) Go to worksheet tabe on bottom of page the initially said Sheet1
3) Right click and select View Code
4) Paste code into VBA window.
5) remove the if necessary that this website sometime inserts.


Go to workbook and try it, your'll like it.


Sub worksheet_change(ByVal Target As Range)

If Target.Column = 23 Then

If Target < Cells(Target.Row, 22) Then

ReasonWhy = InputBox("Enter Reason date was Pushed back")
Cells(Target.Row, 24) = ReasonWhy

End If

End If

End Sub


"Pasty" wrote:

Hi (again!),

I have a 3 columns for actions on a register. Planned end date (V), actual
end date (W) and why was the date pushed out? (X). If the planned and actualy
end date are the same this is fine and the spreadsheet flags it that the
action has been closed. If they actual date is after the planned date its
states it has been pushed out. How do I get it to bring up and input box when
the actual date is entered in W and the dates are different? The information
entered in the input box will be stored in column X.

Thanks for your help