learning18
02-10-2016, 09:04 AM
Hi Everyone,
I am new at VBA and would like someones expert opinion on this:
I am presently working on a sub procedure which includes the use of a function "Linterp",
Linterp requires a "range" and a "double" character to complete its operations,
I am trying to firstly assign the range, and the double value, and set the answer generated by "Linterp" to a function,
Here is my present code:
Private Sub displacement()
Dim y as Double
Dim x As Double
Dim x1 As Double
Dim Displacement as Double
x1=10*y
(Doesnt Work)
x = WorksheetFunction.Linterp("BP8:BQ11", x1)
Cells(row, 71) = x
(This works)
displacement = WorksheetFunction.Sum(Range("BT17:BT42"))
Cells(row, 75).Value = displacement
End Sub
How can I call the linterp macro, assign its range and double character and assign it to a variable I can output ?
Your Help is greatly appreciated!,
Thanks!
I am new at VBA and would like someones expert opinion on this:
I am presently working on a sub procedure which includes the use of a function "Linterp",
Linterp requires a "range" and a "double" character to complete its operations,
I am trying to firstly assign the range, and the double value, and set the answer generated by "Linterp" to a function,
Here is my present code:
Private Sub displacement()
Dim y as Double
Dim x As Double
Dim x1 As Double
Dim Displacement as Double
x1=10*y
(Doesnt Work)
x = WorksheetFunction.Linterp("BP8:BQ11", x1)
Cells(row, 71) = x
(This works)
displacement = WorksheetFunction.Sum(Range("BT17:BT42"))
Cells(row, 75).Value = displacement
End Sub
How can I call the linterp macro, assign its range and double character and assign it to a variable I can output ?
Your Help is greatly appreciated!,
Thanks!