how can i fit any type of formula in formula line in vba code
here i have applied simple vba to apply formula based on cell selection from running vba macro and it's working perfectly when i placing formula into formulaR1C1 and here what i want how can apply only formula to formula line code without converting formula to formulaR1C1
here what the problem is when i placing only formula in formula line of code of vba then that line of code is changed to red color
here i have applied simple vba to apply formula based on cell selection from running vba macro and it's working perfectly when i placing formula into formulaR1C1 and here what i want how can apply only formula to formula line code without converting formula to formulaR1C1
here what the problem is when i placing only formula in formula line of code of vba then that line of code is changed to red color
VBA Code:
Sub Multi()
Dim Formula As String
Formula = "=VALUE(LEFT(G10,FIND(" ",G10))*VALUE(LEFT(H10,FIND(" ",H10)-1)))"
With Selection
.Formula = Formula
.Value = .Value
End With
End Sub