Hi,

I'm trying to use this code in a vba module:

sub mysub()

Range("AA2:AA" & Range("C" & Rows.Count).End(3).Row).Formula = "=IF(AND(A2<>"""",A1="",C1=C2,D1<>1,E1=4),C2 & ""AddThis"" ,C2)"

end sub
However, when i run it i get the error "runtime error '1004' application-defined or object-defined error". Can anyone help me with what's going wrong here please?

thanks in advance!