Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
If Target.Value = "Med" Then
Rows(Target.Row).Interior.ColorIndex = 4
Cells(Target.Row, 10) = "=IF(RC[3]="""","""",RC[3]-3)"
Else
If Target.Value = "Tasc" Then
Rows(Target.Row).Interior.ColorIndex = 6
Cells(Target.Row, 10) = "=IF(RC[1]="""","""",RC[1]-2)"
Else
If Target.Value = "Nbar" Then
Rows(Target.Row).Interior.ColorIndex = x1ColorIndexNone
Cells(Target.Row, 23) = "=IF(RC[-1]="""","""",RC[-1]+7)"
Cells(Target.Row, 22) = "=IF(RC[-1]="""","""",RC[-1]+7)"
Cells(Target.Row, 21) = "=IF(RC[-8]="""","""",RC[-8]+14)"
Cells(Target.Row, 12) = "=IF(RC[1]="""","""",RC[1]-5)"
Cells(Target.Row, 11) = "=IF(RC[1]="""","""",RC[1]-2)"
Cells(Target.Row, 10) = "=IF(RC[1]="""","""",RC[1]-7)"
Else
Rows(Target.Row).Interior.ColorIndex = xlColorIndexNone
End If
End If
End If
End If
End Sub
Also is there a way to protect the sheet and allow user to input information other than adding text to the macro to allow for unprotecting and then reprotecting?
any assistance is greatly appreciated