Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Never saw your post until after I posted Biff - better still.
-- Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "T. Valko" wrote in message ... 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 |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ISBLANK function not working when cell is blank dut to function re | Excel Discussion (Misc queries) | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions |