Hi, i have the following formula, which works properly, once I try and use it in vba, it doesnt like the :
"",""
or
"NI"
=IF(AD7="","",IF(AG7="NI",VLOOKUP(AL7,Data!$P$19:$Q$44,2,TRUE),VLOOKUP('OMS Upload'!AL7,Data!$K$19:$L$42,2,TRUE)))
what's the best way to update my code to show the formula as I expect above?
"",""
or
"NI"
=IF(AD7="","",IF(AG7="NI",VLOOKUP(AL7,Data!$P$19:$Q$44,2,TRUE),VLOOKUP('OMS Upload'!AL7,Data!$K$19:$L$42,2,TRUE)))
what's the best way to update my code to show the formula as I expect above?
VBA Code:
'Price formula
Range("AI7:AI" & lastrowfinal).Formula = "=IF(AD7="","",IF(AG7=""NI"",VLOOKUP(AL7,Data!$P$19:$Q$44,2,TRUE),VLOOKUP('OMS Upload'!AL7,Data!$K$19:$L$42,2,TRUE)))"