Hi,

I have created a simple Public Function (to be expanded) but want to make sure I can get the call in excel working. Here is the code:

Public Function Wind (Direction as integer) as integer

If Direction > 0 & Direction <=10 Then Wind = 1
Else: Wind = 0
End If

End Public Function

Essentially Direction is a numeric value for wind direction and i am seeing if it is between 0 and 10. When i type the following in excel
=Wind (A1) it returns #VALUE
Any help would be appreciated