Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Find closest match and return next highest number in range

Hi, Group
I have tried doing this with INDEX and MATCH but without success.
I have 2 columns of data, A and B

A B

40 40
100 50
100 70
200 115
400 365
600 40
800 80
1200 985
1600 1150

What I need to do is take
the one value from column B (365 in this case) find the closest value in A
then return the next highest value from column A (600).

Grateful for any help !!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Find closest match and return next highest number in range

Maybe

=INDEX(A1:A9,MATCH(365,A1:A9,1)+1)

Mike

"x6v87qe" wrote:

Hi, Group
I have tried doing this with INDEX and MATCH but without success.
I have 2 columns of data, A and B

A B

40 40
100 50
100 70
200 115
400 365
600 40
800 80
1200 985
1600 1150

What I need to do is take
the one value from column B (365 in this case) find the closest value in A
then return the next highest value from column A (600).

Grateful for any help !!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Find closest match and return next highest number in range

Hi, Mike

Very close to what I need ! one more criteria: if the value taken out has a
exactly match then return that value. if not then return the the next highest
value

Thanks Mike !

"Mike H" wrote:

Maybe

=INDEX(A1:A9,MATCH(365,A1:A9,1)+1)

Mike

"x6v87qe" wrote:

Hi, Group
I have tried doing this with INDEX and MATCH but without success.
I have 2 columns of data, A and B

A B

40 40
100 50
100 70
200 115
400 365
600 40
800 80
1200 985
1600 1150

What I need to do is take
the one value from column B (365 in this case) find the closest value in A
then return the next highest value from column A (600).

Grateful for any help !!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Find closest match and return next highest number in range

Hmmm,

Any more surprises? try this

=IF(INDEX(A1:A9,MATCH(365,A1:A9,1))=365,INDEX(A1:A 9,MATCH(365,A1:A9,1)),INDEX(A1:A9,MATCH(365,A1:A9, 1)+1))

As the formula is now quite long I would suggest you use a cell reference
instead of putting 365 in the formula which is good practice anyway.

=IF(INDEX(A1:A9,MATCH(C1,A1:A9,1))=C1,INDEX(A1:A9, MATCH(C1,A1:A9,1)),INDEX(A1:A9,MATCH(C1,A1:A9,1)+1 ))

Mike

"x6v87qe" wrote:

Hi, Mike

Very close to what I need ! one more criteria: if the value taken out has a
exactly match then return that value. if not then return the the next highest
value

Thanks Mike !

"Mike H" wrote:

Maybe

=INDEX(A1:A9,MATCH(365,A1:A9,1)+1)

Mike

"x6v87qe" wrote:

Hi, Group
I have tried doing this with INDEX and MATCH but without success.
I have 2 columns of data, A and B

A B

40 40
100 50
100 70
200 115
400 365
600 40
800 80
1200 985
1600 1150

What I need to do is take
the one value from column B (365 in this case) find the closest value in A
then return the next highest value from column A (600).

Grateful for any help !!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Find closest match and return next highest number in range

Ahhh!!!

No more triks!! Thanks Mike !! exactly what I'm after

"Mike H" wrote:

Hmmm,

Any more surprises? try this

=IF(INDEX(A1:A9,MATCH(365,A1:A9,1))=365,INDEX(A1:A 9,MATCH(365,A1:A9,1)),INDEX(A1:A9,MATCH(365,A1:A9, 1)+1))

As the formula is now quite long I would suggest you use a cell reference
instead of putting 365 in the formula which is good practice anyway.

=IF(INDEX(A1:A9,MATCH(C1,A1:A9,1))=C1,INDEX(A1:A9, MATCH(C1,A1:A9,1)),INDEX(A1:A9,MATCH(C1,A1:A9,1)+1 ))

Mike

"x6v87qe" wrote:

Hi, Mike

Very close to what I need ! one more criteria: if the value taken out has a
exactly match then return that value. if not then return the the next highest
value

Thanks Mike !

"Mike H" wrote:

Maybe

=INDEX(A1:A9,MATCH(365,A1:A9,1)+1)

Mike

"x6v87qe" wrote:

Hi, Group
I have tried doing this with INDEX and MATCH but without success.
I have 2 columns of data, A and B

A B

40 40
100 50
100 70
200 115
400 365
600 40
800 80
1200 985
1600 1150

What I need to do is take
the one value from column B (365 in this case) find the closest value in A
then return the next highest value from column A (600).

Grateful for any help !!

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
Help! Find Closest Coordinate Match Bill Excel Discussion (Misc queries) 6 May 2nd 23 07:42 PM
return next highest number in range Code Numpty Excel Worksheet Functions 6 April 21st 11 08:19 PM
Find closest match and copy saman110 via OfficeKB.com Excel Discussion (Misc queries) 3 August 31st 07 06:30 AM
Find the closest match to a reference number in a row of unsorted Nick Krill Excel Worksheet Functions 3 January 1st 06 08:33 PM
find closest match to a reference number in a row of numbers Nick Krill Excel Discussion (Misc queries) 4 December 21st 05 11:59 AM


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