|
-
Aug 5th, 2011, 11:15 AM
#1
Thread Starter
New Member
Public Function VBA #VALUE Error
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|