Formula in Cell with VBA
Hi,
I have the following code in my project:
For j = 1 To 8
Range("Prices").Columns(j).Select
If j < mMinRental Then
Range("Prices").Columns(j).Cells.Value = 0
ElseIf j < 8 Then Range("Prices").Columns(j).Cells.Formula = InputBox("How do we calculate " & j & " prices?", "Formulas")
End If
This is meant for the user to input the formula with which the prices for a given group of products will be calculated.
When the inputbox result is, for example, =Seven/2 (Seven being a range in the worksheet) this works marvellously, but if the input is, for example, =MROUND(Seven/2;0,1) this results in an error: "Application-defined or Object-defined error".
Can someone help me please?
Thank you,
Khlaudhya
|