Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default find where a number belongs in a series of numbers

Is there an easy excel formula that I can use that will find where a number
belongs in a series of numbers.
So for instance
in A1 to A 500 I have random numbers. I can order them lowest to highest.
then I have a new single number.
Lets say it would go between 40 and 41
is there a excel formula that would help me on this?
to make it easy and the right way to do it.
instead of a lot of code?

thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default find where a number belongs in a series of numbers

Hi

Why not put the new number in the first empty cell in the column, then
sort the column.

Hopes this helps.
....
Per


On 15 Jul., 18:12, "greg" wrote:
Is there an easy excel formula that I can use that will find where a number
belongs in a series of numbers.
So for instance
in A1 to A 500 I have random numbers. *I can order them lowest to highest.
then I have a new single number.
Lets say it would go between 40 and 41
is there a excel formula that would help me on this?
to make it easy and the right way to do it.
instead of a lot of code?

thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default find where a number belongs in a series of numbers

Are you looking for the row number at which you would insert the entry at?
If so, and assuming there are no repeated values in the random list...

InsertAtRow = 1 + WorksheetFunction.Match(N, Range("A1:A500"), 1)

where N is the "new single number".

--
Rick (MVP - Excel)


"greg" wrote in message
...
Is there an easy excel formula that I can use that will find where a
number belongs in a series of numbers.
So for instance
in A1 to A 500 I have random numbers. I can order them lowest to highest.
then I have a new single number.
Lets say it would go between 40 and 41
is there a excel formula that would help me on this?
to make it easy and the right way to do it.
instead of a lot of code?

thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default find where a number belongs in a series of numbers

the MATCH function will do that

=MATCH(D3,A1:A500,TRUE)

as your numbers are sorted, TRUE will return index the number 'nearest' to
the one you're looking for.

so if in A you had 39 40 41 42 43 and you did a match on 41.4 then answer
would be 3 .... as the 3rd item, 41 is the closest to, and less than your
query


"greg" wrote in message
...
Is there an easy excel formula that I can use that will find where a
number belongs in a series of numbers.
So for instance
in A1 to A 500 I have random numbers. I can order them lowest to highest.
then I have a new single number.
Lets say it would go between 40 and 41
is there a excel formula that would help me on this?
to make it easy and the right way to do it.
instead of a lot of code?

thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default find where a number belongs in a series of numbers

thanks all
match works


"Patrick Molloy" wrote in message
...
the MATCH function will do that

=MATCH(D3,A1:A500,TRUE)

as your numbers are sorted, TRUE will return index the number 'nearest' to
the one you're looking for.

so if in A you had 39 40 41 42 43 and you did a match on 41.4 then answer
would be 3 .... as the 3rd item, 41 is the closest to, and less than your
query


"greg" wrote in message
...
Is there an easy excel formula that I can use that will find where a
number belongs in a series of numbers.
So for instance
in A1 to A 500 I have random numbers. I can order them lowest to
highest.
then I have a new single number.
Lets say it would go between 40 and 41
is there a excel formula that would help me on this?
to make it easy and the right way to do it.
instead of a lot of code?

thanks



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
Formula to find the last number in a series OX_Gambit Excel Worksheet Functions 8 December 10th 08 07:44 PM
How do I use VBA to find which named ranges a cell belongs to? Charis Custard Excel Programming 4 April 3rd 07 06:38 PM
How to find missing numbers in series phil Excel Worksheet Functions 5 July 26th 06 04:38 PM
how can we find out any missed number in a series? Excel Excel Discussion (Misc queries) 4 May 17th 06 04:57 PM
Given a cell, find the named range it belongs to Dag Johansen[_5_] Excel Programming 3 September 27th 03 12:39 AM


All times are GMT +1. The time now is 07:03 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"