I have the following code in my spreadsheet and it is working great:
My problem is that this spreadsheet is a running one that is tracking the progress of numerous functions and tasks. I need to add rows to this spreadsheet every so often so that it will go past row 19. (As an aside, my data only goes to row 18 right now. Row 19 is blank and hidden so that some average and st dev calculations can be run at the bottom of the columns. I do this so that when I add a row, I do so above row 19 and these calculations automatically update the affected cells. Not sure if this is pertinent to my problem).Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("d3:e19, g3:h19, j3:k19, m3:n19, p3:q19, s3:t19, v3:w19, y3:z19, ab3:ac19, ae3:af19, ah3:ai19, ak3:al19, an3:ao19, aq3:ar19, at3:au19, aw3:ax19, az3:ba19, bc3:bd19, bf3:bg19, bi3:bj19, bl3:bm19"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
' select Today's date in the Calendar
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If
End Sub
Is there a way to add a modifier to this code that will automatically update the rows past 19 without me having to go into the source and update all the columns manually?
Bookmarks