Helpneeded in writing special function, "IsBetween"
select it in the project explorer and select ThisWorkbook. Then go to the
properties window and select the isaddin property and set it to true.
--
Regards,
Tom Ogilvy
"John Wirt" wrote in message
...
How do I make Personal.xls an Add-in? Thanks.
John
"J.E. McGimpsey" wrote in message
...
Unless your Personal.xls is an add-in, you need to explicitly
reference Personal.xls:
=Personal.xls!IsBetween(A1,B1,C1)
You also had an Endi If missing.
In article ,
"John Wirt" wrote:
I want to write a VBA function that compares the numeric values in
cell1
against the value is cell2 and cell 3, and reports "Yes" if cell1 is
between
cell2 and cell 3, and otherwise "No." Here is a cut & paste of the
function
I;ve written in PERSONAL.XLS (see below).
WHen I enter =IsBetween(A1, B1,C1) in D1 with numeric values in A1,
B1,
and
C1 I get a #NAME error in D1. How come?
Function IsBetween(cell1, cell2, cell3) As String
If cell1 cell2 Then
If cell1 < cell3 Then
IsBetween = "Yes"
Else
IsBetween = "No"
End If
ElseIf cell1 < cell2 Then
If cell1 cell3 Then
IsBetween = "Yes"
Else
IsBetween = "No"
End If
End Function
Thanks.
John Wirt
|