V
Val
I wrote a VBA function that I want to use as a worksheet
function. The function supposes to convert degrees of
Fahrenheit into Celsius and, additionally, write in cell
A1 "Hello". As long as there is writing to A1 the function
gives #VALUE error. This is my code:
Function Celsius(fDegrees)
ActiveWorkbook.Sheets("Scheet1").Select
Sheets("Scheet1").Range("A1:A1").Text = "Hello"
Celsius = (fDegrees - 32) * 5 / 9
End Function
How to write it to make it work from the worksheet?
function. The function supposes to convert degrees of
Fahrenheit into Celsius and, additionally, write in cell
A1 "Hello". As long as there is writing to A1 the function
gives #VALUE error. This is my code:
Function Celsius(fDegrees)
ActiveWorkbook.Sheets("Scheet1").Select
Sheets("Scheet1").Range("A1:A1").Text = "Hello"
Celsius = (fDegrees - 32) * 5 / 9
End Function
How to write it to make it work from the worksheet?