View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default calculating dates automatically

Megan,

With a date in A1 put this in B1

=A1+5

If you want it without a formula right click the sheet tab, view code and
paste this in:-

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then 'change to suit
'Ensure target is a date
If IsDate(Target) Then
Application.EnableEvents = False
Target.Offset(0, 1).Value = Target.Value + 5
Application.EnableEvents = True
End If
End If
End Sub


Mike
"Megan" wrote:

I would like to make a template that allows me to enter a date in to one
column and have the second column automatically calculate the date that
occurs 5 days later. If anyone can help me with setting this up I would
REALLY appreciate it.

Thanks for your time,
Megan