I need to be able to change all positive values into negative values in a range based upon the value of a field in each row. For example, a row contains a cell (column E) that is either "T3" or "T7". Also in that row are 6 cells containing numbers. If the E column is "T7", I want all the values of the cells in F-K to be negative. I also don't want it to reverse the value, so multiplying the value times -1 won't work.
The code below almost works. I just need to know the correct syntax to change so that it doesn't change the entire range (F9:K202) when it matches "T7" on one particular row. It just needs to change the positive to negatives for that row if that row is a T7 match.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range
Dim t As Range
For Each t In Range("E9:E202")
If t.Value = "T7" Then
For Each r In Range("F9:K202")
If r.Value > 0 Then r.Value = -r.Value