davcurnutt
New Member
- Joined
- Mar 31, 2023
- Messages
- 10
- Office Version
- 365
- Platform
- Windows
I am trying to us VBA to input a formula in column O if column A contains the text "Cancel Details". If it contains the text, I want a formula inserted in Column O that will multiply column I and J and add column M. There are multiple worksheets in the workbook and I want it to do this to all sheets. This is what I put in VBA but doesn't work.
Range("O1:O900").Formula = _
"=IF(($A1="Cancel Details",=($I1*$J1)+$M1))"
Range("O1:O900").Formula = _
"=IF(($A1="Cancel Details",=($I1*$J1)+$M1))"