whitebearstech
IS-IT--Management
Hi,
I'm new to VBA and was trying really really hard not to ask questions, but I'm stumped on a simple code. I just want the code to see if row B has a value of CR. If so, make rows d and e negative. The following code works for only 1-10, but I need it to go through every row that has a value from column A.
This needs to be in the code "Cells(Rows.Count, "A").End(xlUp).Row" but I keep getting a ton of errors every time a try.
For Temp = 1 To 10
If Range("B" & Temp).Value = "CR" Then
Range("D" & Temp) = Abs(Range("D" & Temp).Value) * -1
Range("E" & Temp) = Abs(Range("E" & Temp).Value) * -1
End If
Next Temp
I'm new to VBA and was trying really really hard not to ask questions, but I'm stumped on a simple code. I just want the code to see if row B has a value of CR. If so, make rows d and e negative. The following code works for only 1-10, but I need it to go through every row that has a value from column A.
This needs to be in the code "Cells(Rows.Count, "A").End(xlUp).Row" but I keep getting a ton of errors every time a try.
For Temp = 1 To 10
If Range("B" & Temp).Value = "CR" Then
Range("D" & Temp) = Abs(Range("D" & Temp).Value) * -1
Range("E" & Temp) = Abs(Range("E" & Temp).Value) * -1
End If
Next Temp