I need to write in column 24 the result of an IF formula that includes reference to relative cell. I think the fatest way is using Evluate function, but I didn't understand how to write each cell relative reference in the formula. This is my code
Set Rng1 = Sheets("Leaders").Cells(12, 19)
g = Evaluate("IF(OR(" & Rng1.Offset(, -3).Address(False, False) & "=""x""," & Rng1.Offset(, -5).Address(False, False) & "=""1:1 matching"")," & Rng1.Offset(, 3).Address(False, False) & "*" & Rng1.Offset(, 4).Address(False, False) & ")")
Sheets("Leaders").Range(Cells(12, 24), Cells(lastRow1, 24)) = Evaluate(g)
the result is zero in all cell of column 24
Aucun commentaire:
Enregistrer un commentaire