Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 86
Default Is there a BETWEEN function?

How do you test if a number is equal to or BETWEEN two other numbers, rather
than greater than or equal to the smallest and less than or equal to the
biggest.

Reason being, the smaller number and the larger number may swap cell
addresses at times.

Thanks, all.

Arlen
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Is there a BETWEEN function?

You can use MIN to get the smaller of the two, and MAX for the larger,
so you would have something like:

=IF(AND(A1=MIN(B1,C1),A1<=MAX(B1,C1)),true_action ,false_action)

where B1 and C1 specify the range and either could be the larger, and
A1 is the value you are testing.

Hope this helps.

Pete

On Jul 24, 12:35*am, Arlen wrote:
How do you test if a number is equal to or BETWEEN two other numbers, rather
than greater than or equal to the smallest and less than or equal to the
biggest.

Reason being, the smaller number and the larger number may swap cell
addresses at times.

Thanks, all.

Arlen


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 86
Default Is there a BETWEEN function?

Makes sense. Thanks for thinking of it.

Arlen

"Pete_UK" wrote:

You can use MIN to get the smaller of the two, and MAX for the larger,
so you would have something like:

=IF(AND(A1=MIN(B1,C1),A1<=MAX(B1,C1)),true_action ,false_action)

where B1 and C1 specify the range and either could be the larger, and
A1 is the value you are testing.

Hope this helps.

Pete

On Jul 24, 12:35 am, Arlen wrote:
How do you test if a number is equal to or BETWEEN two other numbers, rather
than greater than or equal to the smallest and less than or equal to the
biggest.

Reason being, the smaller number and the larger number may swap cell
addresses at times.

Thanks, all.

Arlen



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Is there a BETWEEN function?

You're welcome - thanks for feeding back.

Pete

On Jul 24, 1:08*am, Arlen wrote:
Makes sense. *Thanks for thinking of it.

Arlen

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Is there a BETWEEN function?

Another one:

=A1=MEDIAN(A1:C1)

--
Biff
Microsoft Excel MVP


"Arlen" wrote in message
...
How do you test if a number is equal to or BETWEEN two other numbers,
rather
than greater than or equal to the smallest and less than or equal to the
biggest.

Reason being, the smaller number and the larger number may swap cell
addresses at times.

Thanks, all.

Arlen





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default Is there a BETWEEN function?

Too late because I'm not a night owl like Pete but just for fun, with the
test number in A1 and the limits in B1 & C1:

=IF(MEDIAN(B1,C1,A1)=A1,"Between or Equal","Not Between")

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Arlen" wrote in message
...
How do you test if a number is equal to or BETWEEN two other numbers,
rather
than greater than or equal to the smallest and less than or equal to the
biggest.

Reason being, the smaller number and the larger number may swap cell
addresses at times.

Thanks, all.

Arlen



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 86
Default Is there a BETWEEN function?

Thanks, Pete, Biff and Sandy

It's good to have several tricks up your arsenal.

Arlen


"Sandy Mann" wrote:

Too late because I'm not a night owl like Pete but just for fun, with the
test number in A1 and the limits in B1 & C1:

=IF(MEDIAN(B1,C1,A1)=A1,"Between or Equal","Not Between")

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Arlen" wrote in message
...
How do you test if a number is equal to or BETWEEN two other numbers,
rather
than greater than or equal to the smallest and less than or equal to the
biggest.

Reason being, the smaller number and the larger number may swap cell
addresses at times.

Thanks, all.

Arlen




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ISBLANK function not working when cell is blank dut to function re mcmilja Excel Discussion (Misc queries) 9 May 7th 23 03:43 AM
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM


All times are GMT +1. The time now is 07:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"