Per the below macro, i am getting a compile error for the line in red. In short i want to see if any row in column D if there is a Number 5080 than print the word NOTHING otherwise the word NONEED, than goto the next row.
can someone let me know where the error maybe?
thanks
Sub Nyexcel3()
With Range("I4", Range("B" & Rows.Count).End(xlUp).Offset(, 7))
.Value = Evaluate(Replace("if((@ ="" ""),""NONEED"",if((@ =""""),"""",2010))", "@", .Offset(, -7).Address))
End With
With Range("I4", Range("D" & Rows.Count).End(xlUp).Offset(, 5))
.Value = Evaluate(Replace("if((@ =""5080""),""NOTHING"",""NONEED"", .Offset(, -5).Address))
End With
End Sub
can someone let me know where the error maybe?
thanks
Sub Nyexcel3()
With Range("I4", Range("B" & Rows.Count).End(xlUp).Offset(, 7))
.Value = Evaluate(Replace("if((@ ="" ""),""NONEED"",if((@ =""""),"""",2010))", "@", .Offset(, -7).Address))
End With
With Range("I4", Range("D" & Rows.Count).End(xlUp).Offset(, 5))
.Value = Evaluate(Replace("if((@ =""5080""),""NOTHING"",""NONEED"", .Offset(, -5).Address))
End With
End Sub