gravanoc
Active Member
- Joined
- Oct 20, 2015
- Messages
- 346
- Office Version
- 365
- Platform
- Windows
- Mobile
I create the following formula in VBA using concat operators:
If I click into the cell represented by rvRng.Offset(0, 3), then press F2 then press Enter, the formula will activate and calculate properly. I'm just trying to accomplish this using VBA. I considered SendKeys, but it is probably not reliable enough for this situation. Any ideas?
VBA Code:
rvRng.Offset(0, 3).FormulaR1C1 = _
"=""=IFERROR(SUM('RV #"" &[@[Account '#]] & "" - "" &[@[Unit Name]] & ""'!D:D), $0.00)"""
rvRng.Offset(0, 3).Copy
rvRng.Offset(0, 3).PasteSpecial xlPasteValues
' wksInventory.Calculate (this line doesn't do the trick, unfortunately)
If I click into the cell represented by rvRng.Offset(0, 3), then press F2 then press Enter, the formula will activate and calculate properly. I'm just trying to accomplish this using VBA. I considered SendKeys, but it is probably not reliable enough for this situation. Any ideas?