I need to do something like:
1) If blank then run "delete_data"
2) not blank and cell to left is "P" run Private Sub Add_data_P
3) not blank and cell to left is "S" run Private Sub Add_data_S
4) not bland and cell to left is not "P" or "S" then do nothing
The only training I have is what I can strip out of the forum examples. So if someone can help I would appreciate it.
Thanks,
Chris
When I make a change in the within the target range I need to do one of the following:Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
Dim rng As Range
Set rng = Range("D9:D53")
If Intersect(Target, rng) Is Nothing Then Exit Sub
If ActiveCell.Range("A1").Value > "" Then 'blank then run Private Sub delete_data
If ActiveCell.Offset(0, -1).Value = "P" Then 'not blank and cell to left is "P" run Private Sub Add_data_P
If ActiveCell.Offset(0, -1).Value = "S" Then 'not blank and cell to left is "S" run Private Sub Add_data_S
If ActiveCell.Offset(0, -1).Value = "" Then 'not blank and cell to left is blank do nothing
End If
End If
End If
Application.ScreenUpdating = true
End Sub
1) If blank then run "delete_data"
2) not blank and cell to left is "P" run Private Sub Add_data_P
3) not blank and cell to left is "S" run Private Sub Add_data_S
4) not bland and cell to left is not "P" or "S" then do nothing
The only training I have is what I can strip out of the forum examples. So if someone can help I would appreciate it.
Thanks,
Chris