Hello Excel experts,
I want to know what I Need to do declare and use a TextBox I want to add in a UserForm, so that the numerical value entered in this field will be the value to use for a formula.
This is the Code for the calculation:
With Cells(1, Columns.Count).End(xlToLeft).Offset(, 1)
.Resize(, 2).Value = Array("Average", "25% Average")
.Offset(1, 0).Resize(LastRow - 1).FormulaR1C1 = "=AVERAGE(RC2:RC[-1])"
.Offset(1, 1).Resize(LastRow - 1).FormulaR1C1 = "=RC[-1]*REFERENCEVALUE"
.Resize(, 2).EntireColumn.NumberFormat = "0.0000"
End With
I would like the user to be able to modify the value that will multiply RC[-1], that means "REFERENCEVALUE".
So the question is, how can I create the TextBox that will give me the value "REFERENCEVALUE" that the user can enter?
Thank you very much in advance and I hope I was clear enough.
Jorge
Bookmarks