Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Returning true if a number fits between a range

Hi,

I need 2 test whether a number fits between 2 numbers.
For example, if A1 contain 10, A2 contains 2, and A3 (my
test cell) contains 6 then the test displayed in A4 will
show True (or False). The values of A1-A3 will constantly
change.
Tried many ways to do this but can't figure out the logic.
Can someone help

Tony
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Returning true if a number fits between a range

=And(Min(A1,A2)<A3,Max(A1,A2)A3)


if the number can equal either of the values then
=And(Min(A1,A2)<=A3,Max(A1,A2)=A3)

--
Regards,
Tom Ogilvy

"David" wrote in message
...
Hi,

I need 2 test whether a number fits between 2 numbers.
For example, if A1 contain 10, A2 contains 2, and A3 (my
test cell) contains 6 then the test displayed in A4 will
show True (or False). The values of A1-A3 will constantly
change.
Tried many ways to do this but can't figure out the logic.
Can someone help

Tony



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Returning true if a number fits between a range

=AND(A3<A1,A3A2)
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Returning true if a number fits between a range

Should have read (to be inclusive)

=AND(A3<=A1,A3=A2)

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Returning true if a number fits between a range

Tom
First formula worked a treat
Many thanks

David

-----Original Message-----
=And(Min(A1,A2)<A3,Max(A1,A2)A3)


if the number can equal either of the values then
=And(Min(A1,A2)<=A3,Max(A1,A2)=A3)

--
Regards,
Tom Ogilvy

"David" wrote in

message
...
Hi,

I need 2 test whether a number fits between 2 numbers.
For example, if A1 contain 10, A2 contains 2, and A3 (my
test cell) contains 6 then the test displayed in A4 will
show True (or False). The values of A1-A3 will

constantly
change.
Tried many ways to do this but can't figure out the

logic.
Can someone help

Tony



.

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
Returning a value when 2 other values are true Lman Excel Worksheet Functions 4 August 13th 09 09:40 PM
Find range a value fits to, assign new value based on importance RiverCity Excel Worksheet Functions 0 November 9th 08 05:01 AM
I would like a function to return a value that fits its range rpbsr Excel Worksheet Functions 4 September 7th 06 06:49 PM
number range returning a text value jason New Users to Excel 3 June 15th 06 08:09 PM
Returning a value for a number in a range Derek Excel Discussion (Misc queries) 1 July 26th 05 04:47 PM


All times are GMT +1. The time now is 04:50 AM.

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

About Us

"It's about Microsoft Excel"