View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default User Defined Function for Wind Chill

Functions in VBA don't reallly support help for the arguments. Laurent
Longre has built a free addin to support this function. It can be
downloaded at:

VBA functions don't support text descriptions in the Function wizard.


http://longre.free.fr/english/index.html#FunCustomize

--
Regards,
Tom Ogilvy



"Carroll" wrote in message
oups.com...
Hello,

I was working on a user-defined function for the Wind Chill Index.
Here is what I came up with so far:

Function WindChill(WindSpeed_MPH, Temp_F°)

WindChill = Format((91.4 - (0.474677 - 0.020425 * WindSpeed_MPH +
0.303107 * WindSpeed_MPH ^ 0.5) * (91.4 - Temp_F°)), "0.0°")

End Function

I got the formula off the internet. I have seen where you can also
have a third parameter to define whether the temperature is Fahrenheit
or Celsius, but I won't worry about that as I never use Celsius, but
I'm sure that could be done as well. If I were to add it, I would make
it that if the third parameter was not used, then it would assume that
you were wanting to use Fahrenheit.

I was wanting to improve it somewhat. For instance, to put a message
right in the cell if two parameters haven't been provided, one or the
other was null, or not numeric. Since parameters can come from a cell
feeding the parameter, or put directly in the cell with the function, I
wasn't sure what was the best way to handle that was. Any ideas? I
wasn't able to get isblank(), etc. to work.

Also, when the function parameter wizard (I think that's the term) is
used, is there any way for me to provide help for that box?

Thanks,

Carroll Rinehart