A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
There is only one Worksheet_Change event so all the code has to go in the one procedure.
The code you have written doesn't look quite right.
It would be better to use a formula than a value for the Consecutive and Simultaneous cases - otherwise if the earlier plan dates move the relationship will not be preserved.
You might have meant something like this.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("L90:L115")) Is Nothing Then Exit Sub ' not a task type
If Target.Cells.Count > 1 Then Exit Sub ' not a single cell entry
If Target.Value = "Independent" Then
Target.Offset(, -4).Value = InputBox("Please enter the activity start date (MM/DD/YY)
ElseIf Target.Value = "Consecutive" Then
Target.Offset(,-4).Formula = "=WorkDay_Intl( B3, J" & Target.Row-2 & ", 1, Referecences!$B$4:$B$16)"
ElseIf Target.Value = "Simultaneous" Then
Target.Offset(,-4).Formula = "=H" & Target.Row-2
End If
End Sub
I really recommend naming the ranges that you use in VBA code.
So, if you use Formulas > Name Manager to name L90:L115 as "TaskTypes" you can change the first line to
If Intersect(Target, Me.Range("TaskTypes")) Is Nothing Then Exit Sub ' not a task type
Otherwise when you add or delete rows above 90 you will need to modify the code - and you won't always remember to do so; however the range name will automatically adjust.
If you need to add rows to the task table, adding them before the last current row will cause the range name to adjust accordingly.