grantboshart
New Member
- Joined
- Jul 1, 2015
- Messages
- 49
Hello all,
I am currently having an issue with the below formula being pasted into a cell.formula as shown. If I take away the If(C12<>"", , ) then the formula pastes just fine. when I paste the formula directly into a cell, it also works perfectly. Is there a way to have the macro not worry about the actual formula and just paste is word for word? Script below
vVv
Sub DefaultSlopes()
If MsgBox("Are you sure you want to change all pipe slopes back to default?" & vbNewLine & "This action cannot be reversed.", vbYesNo + vbExclamation, "Just making sure that wasn't an accident.") = vbYes Then
Range("R12:R100").Formula(I have also tried .Value) = "=IF(C12<>"",IF(P12=24, 0.18, IF(P12=30,0.13,IF(P12=36, 0.11, 0.1))),"")"
Else
End If
End Sub
Thanks!
I am currently having an issue with the below formula being pasted into a cell.formula as shown. If I take away the If(C12<>"", , ) then the formula pastes just fine. when I paste the formula directly into a cell, it also works perfectly. Is there a way to have the macro not worry about the actual formula and just paste is word for word? Script below
vVv
Sub DefaultSlopes()
If MsgBox("Are you sure you want to change all pipe slopes back to default?" & vbNewLine & "This action cannot be reversed.", vbYesNo + vbExclamation, "Just making sure that wasn't an accident.") = vbYes Then
Range("R12:R100").Formula(I have also tried .Value) = "=IF(C12<>"",IF(P12=24, 0.18, IF(P12=30,0.13,IF(P12=36, 0.11, 0.1))),"")"
Else
End If
End Sub
Thanks!