Thread: Custom Function
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Trevor Shuttleworth Trevor Shuttleworth is offline
external usenet poster
 
Posts: 1,089
Default Custom Function

post your code please


"Martin" wrote in message
...
I am in the process of trying to create a Function that will take a value
and
determine if it appears in a table of ranges. For example, my table of
ranges may be:
Lower Upper
10000 15000
30000 35000
A C
g i

If I use a value of 11000, my function would return a 1 since it is in one
of the ranges. A value of d would return a 0.

This all works fine as long as I do not use this function as a formula in
a
cell. When I do use it in a cell, the #VALUE results, regardless of
whether
the value is in a range or not.

I guess I have two questions:
1) Has someone done something like this and have any suggestions?
2) Can anyone give me an idea of why I am getting the #VALUE in the cell?

Thanks.