gtd526
Well-known Member
- Joined
- Jul 30, 2013
- Messages
- 657
- Office Version
- 2019
- Platform
- Windows
Hello,
Looking to add a formula to a selected cell containing an Error.
I can't get the formula into the cell.
thanks
Looking to add a formula to a selected cell containing an Error.
I can't get the formula into the cell.
thanks
VBA Code:
Dim c As Range
Sheets("Main2").Select
For Each c In Range("C3:C200")
If c.Value = CVErr(xlErrNA) Then
'enter formula
c.Formula = "=INDEX('[The Whole Enchilada.xlsm]PotInvests'!$E$9:$E$30,MATCH(A:A,'[The Whole Enchilada.xlsm]PotInvests'!$A$9:$A$30,0))"
End If
Next c