Hey Bros,
I am facing an error with this simple code.
It can't write the formula in the cells.
Can you please help.
Thanks
I tried c.Formular1c1 = too.
Yours,
M
I am facing an error with this simple code.
It can't write the formula in the cells.
Can you please help.
Thanks
Code:
Sub update_formula()
Dim c As Range
With Materials
For Each c In .Range("tbl[Shortage]")
' Debug.Print c.Address
' Debug.Print Application.WorksheetFunction.IsFormula(c)
If Application.WorksheetFunction.IsFormula(c) Then c.Formula = _
"=IFERROR(IF([@MTYPE]=""Book"",IF(OR(VLOOKUP([@[Work Book]],Ac_WB2[[VWI]:[RCVD '#]],10,0)="""",VLOOKUP([@[Work Book]],Ac_WB2[[VWI]:[RCVD '#]],10,0)=""Short""),""YES"",""NO""),IF(OR([@MTYPE]=""Consumable"",[@MTYPE]=""Chemical"",[@QTY]<1,LEFT([@Material],5)=""Dummy""),""NO"",IF([@Vendor]=""WESCO"",IF([@[HDWR Loc]]<>""_N/A"",IF([@Location]="""",""N/T"",IF(LEFT([@Locatio" & _
"FK"",""NO"", IF([@[RCV File QTY]]="""",""NO"",""YES""))),IF([@Location]="""",""YES"",IF(LEFT([@Location],2)=""FK"",""NO"", IF([@[RCV File QTY]]="""",""NO"",""YES"")))),IF([@Location]<>"""",IF(LEFT([@Location],2)=""FK"",""NO"", IF([@[RCV File QTY]]="""",""NO"",""YES"")),IF(NOT(AND([@[Rcvd Date]]="""",[@[R/N]]="""")),""ATTN"",""YES""))))),"""")"
Next
End With
End Sub
I tried c.Formular1c1 = too.
Yours,
M