A
Angela
Hi friends,
Somehow I could not find the reply link on this previous August post.
Below is the function..
=========================
Option Explicit
Function Between(Number As Double, Bound1 As Double, Bound2 As Double)
As Boolean
Dim LowerLimit As Double
Dim UpperLimit As Double
LowerLimit = IIf(Bound1 <= Bound2, Bound1, Bound2)
UpperLimit = IIf(Bound1 >= Bound2, Bound1, Bound2)
Between = Number >= LowerLimit And Number <= UpperLimit
End Function
===============================
I was wondering if someone can refine this a bit more.
I want to get the information from the table as follows:
FILE NAME START END
A 1 5
B 6 10
C 11 12
Search Value 7
File Name B
If I use above formula I will get false, true, false against 1-5,6-10
& 11-12 respectively. True shows it falls between 6 & 10.
I want to get file name "B". How can I modify this function to get me
this information?
I hope I have asked clearly.
Somehow I could not find the reply link on this previous August post.
Below is the function..
=========================
Option Explicit
Function Between(Number As Double, Bound1 As Double, Bound2 As Double)
As Boolean
Dim LowerLimit As Double
Dim UpperLimit As Double
LowerLimit = IIf(Bound1 <= Bound2, Bound1, Bound2)
UpperLimit = IIf(Bound1 >= Bound2, Bound1, Bound2)
Between = Number >= LowerLimit And Number <= UpperLimit
End Function
===============================
I was wondering if someone can refine this a bit more.
I want to get the information from the table as follows:
FILE NAME START END
A 1 5
B 6 10
C 11 12
Search Value 7
File Name B
If I use above formula I will get false, true, false against 1-5,6-10
& 11-12 respectively. True shows it falls between 6 & 10.
I want to get file name "B". How can I modify this function to get me
this information?
I hope I have asked clearly.