Hello,
I am writing a code which will check if price in column L is lower than column Y or greater than column Z. The following is aimed to loop through the ranges and turn the interior of cells in L red if the condition is false. If I could have some tips on how to re write the code for the IF condition which was recorded in excel and to make it fire. This is the snippet of my code:
For Each D In Sheets("Deals").Range("L1:L" & LASTROW).Cells
If D.Value = "R[-25]C[-1]<R[-25]C[13],IF(R[-25]C[-1]<R[-25]C[13]),IF(R[-25]C[-1]>R[-25]C[14],IF(R[-25]C[-1]>R[-25]C[14])))" Then
ActiveCell.interior.ColorIndex = 6
End If
Next D
I am writing a code which will check if price in column L is lower than column Y or greater than column Z. The following is aimed to loop through the ranges and turn the interior of cells in L red if the condition is false. If I could have some tips on how to re write the code for the IF condition which was recorded in excel and to make it fire. This is the snippet of my code:
For Each D In Sheets("Deals").Range("L1:L" & LASTROW).Cells
If D.Value = "R[-25]C[-1]<R[-25]C[13],IF(R[-25]C[-1]<R[-25]C[13]),IF(R[-25]C[-1]>R[-25]C[14],IF(R[-25]C[-1]>R[-25]C[14])))" Then
ActiveCell.interior.ColorIndex = 6
End If
Next D