What's the trouble you have with your function? In my test it did exactly what I expected the code to do. However, if you call it from the worksheet the argument number1 As Double
would be wrong. You would call it like, =Isokinectic(A1) where A1 contains the number you want to process. But A1 is a range and your function would have to treat it as such.
Function Isokinectic(Source As Range)
With Worksheets("Sheet2")
.Range("H4:H7").Value = Val(Source)
Isokinectic = .Range("H9").Value
End With
End Function
Of course, this still leaves a question as to why you want to write the value in H9 somewhere (wherever you call your UDF). Trying to make sense of it, I arrive at this solution to be called from H7 = Isokinctic(H4)
.
Function Isokinectic(Source As Range)
With Worksheets("Sheet2")
.Range("H5:H6").Value = Val(Source)
Isokinectic = Val(Source)
End With
End Function
In this scenario you would enter the number in H4, the formula in H7 and get the range H5:H7 filled with the same number - Just thinking, lol: