This is my initial code out of confusion with how Worksheet_Change works
based on this table:
I want to be able to subtract 14 days from the End Date value and put it to Cell B1
Code:
Private Sub Worksheet_Change(ByVal Target As Range) With ThisWorkbook.Sheets("Home")
If Target.Address = "$B$4" And Not IsEmpty(.Range("B4", "B1", "B2").Value) Then
.Range("C1").Value = DateAdd("y", Abs(.Range("B4").Value) * -1, CDate(.Range("C2").Value))
End If
End With
End Sub
based on this table:
Code:
+---+---------------------+-----------+
| | A | B |
+---+---------------------+-----------+
| 1 | Start Date: | 8/21/2019 |
| 2 | End Date: | 8/22/2019 |
| 3 | | |
| 4 | Days From End Date: | 14 |
+---+---------------------+-----------+
I want to be able to subtract 14 days from the End Date value and put it to Cell B1