Formula in given via input box
Hallo,
I have following problem. I would need to use the user values
submitted via inputbox into the formula of the following type:
ActiveCell.FormulaR1C1 = "='HIO - Exp'!R[-21]C-'HIO - Rev'!R[-26]C"
I.e. in this case the parameter "HIO" should be submitted via
inputbox.
I have the following code which ends with error.
Sub formula_input_test
IntgInput = InputBox("Submit the segment name (abbrev.)")
segment = IntgInput
Range("A1").Select
ActiveCell.FormulaR1C1 = "='& segment & - Exp & !R[-21]C - '& segment
& - Rev & !R[-26]C"
End Sub
Thanks a lot in advance for any suggestions.
Best regards, Petr Duzbaba
|