Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Get a row number of range where a value is between minimum and max

Hi all,

This might be pretty a breeze for some. I am looking for ONE SINGLE formula
that returns a row number where a supplied value is within minimum (Column A)
and maximum (Column B) range.

For Example:
A B
1 1 10
2 15 20
3 30 40

With the supplied value of 2, I want the formula to return '1' as the number
'1' is between the range of number '1' and number '10' in row 1.

With the supplied value of 11, I want the formula to return BLANK as the
number is not in any range.

With the supplied value of 30, I want the formula to return '3' as the
number '30' is between the range of number '30' and number '40' in row 3.

I hope the above examples help you understand what I look for.

Thanks in advance.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Get a row number of range where a value is between minimum and max

Hi,

Here is one formula:

=IF(SUMPRODUCT((B6=A$1:A$3)*(B6<=B$1:B$3)),MATCH( B6,A$1:A$3,1),"BLANK")

--
Thanks,
Shane Devenshire


"Tetsuya Oguma" wrote:

Hi all,

This might be pretty a breeze for some. I am looking for ONE SINGLE formula
that returns a row number where a supplied value is within minimum (Column A)
and maximum (Column B) range.

For Example:
A B
1 1 10
2 15 20
3 30 40

With the supplied value of 2, I want the formula to return '1' as the number
'1' is between the range of number '1' and number '10' in row 1.

With the supplied value of 11, I want the formula to return BLANK as the
number is not in any range.

With the supplied value of 30, I want the formula to return '3' as the
number '30' is between the range of number '30' and number '40' in row 3.

I hope the above examples help you understand what I look for.

Thanks in advance.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Get a row number of range where a value is between minimum and max

Hi,

In another column, enter running numbers 1,2,3,4, etc. (say col. C)

Enter the following formula
=IF(ISERROR(SUMPRODUCT((A1:A3<=$A$5)*(B1:B3=$A$5) ,C1:C3)),"",SUMPRODUCT((A1:A3<=$A$5)*(B1:B3=$A$5) ,C1:C3))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Tetsuya Oguma" wrote in message
...
Hi all,

This might be pretty a breeze for some. I am looking for ONE SINGLE
formula
that returns a row number where a supplied value is within minimum (Column
A)
and maximum (Column B) range.

For Example:
A B
1 1 10
2 15 20
3 30 40

With the supplied value of 2, I want the formula to return '1' as the
number
'1' is between the range of number '1' and number '10' in row 1.

With the supplied value of 11, I want the formula to return BLANK as the
number is not in any range.

With the supplied value of 30, I want the formula to return '3' as the
number '30' is between the range of number '30' and number '40' in row 3.

I hope the above examples help you understand what I look for.

Thanks in advance.


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
Return the minimum number in a range excluding zero Jive Excel Worksheet Functions 3 November 8th 07 01:41 PM
Sum of minimum values in a Range. BiggDC1 Excel Discussion (Misc queries) 2 June 20th 07 07:33 PM
The second minimum value in a range Manos Excel Worksheet Functions 1 December 5th 06 11:53 AM
How do I get "minimum value" in a range to NOT return zero? Blade Excel Worksheet Functions 4 February 2nd 05 02:06 AM
Minimum value in a range > 0 Barbara Excel Discussion (Misc queries) 3 January 25th 05 04:57 PM


All times are GMT +1. The time now is 09:49 PM.

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"