% variance calculation
Can anybody help me to correct this macro:
Sub Macro1()
Dim exptype
exptype = InputBox("Enter e if expense type.")
ActiveCell.FormulaR1C1 =
"=IF(exptype=""e"",-(RC[-1]/RC[-2]-1),RC[-1]/RC[-2]-1)"
End Sub
Am getting error #NAME?
I do not want to refer exptype to any cell as it's only a general input
Thxs
|