Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Wayne G. Dengel
 
Posts: n/a
Default Appl need that VLOOKUP will not handle

I need means to locate the nearest nbr in column of nbrs that is GREATER
than the source nbr. (Did I say that right?) VLOOKUP finds the nearest
LOWEST.

nbr in question: 6.2
list of nbrs:
4.2
5.6
7.9
10.4
13.5
15.0

Entering 6.2, I would like to find 7.9 (NOT 5.6). Please how do I do this?

I am not experienced at Visual Basic, thus please need a detailed answer.

Thank You!

Wayne


  #2   Report Post  
duane
 
Posts: n/a
Default


I should add this will return the same number if there is an exact match
in the table, else it returns the next larger number


--
duane


------------------------------------------------------------------------
duane's Profile: http://www.excelforum.com/member.php...o&userid=11624
View this thread: http://www.excelforum.com/showthread...hreadid=275965

  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

This seemed to work for me. I put the data in Sheet1, A1:A6 and

=IF(ISNUMBER(MATCH(A1,Sheet1!A1:A6,0)),
INDEX(Sheet1!A1:A6,MATCH(A1,Sheet1!A1:A6,0)),
INDEX(Sheet1!A1:A6,MATCH(A1,Sheet1!A1:A6,1)+1))
(all one cell)

If it's a match, use it. If it's not a match, then find the lower number's
position and add 1--and return that one.

(I guessed an exact match should return that exact value.)

"Wayne G. Dengel" wrote:

I need means to locate the nearest nbr in column of nbrs that is GREATER
than the source nbr. (Did I say that right?) VLOOKUP finds the nearest
LOWEST.

nbr in question: 6.2
list of nbrs:
4.2
5.6
7.9
10.4
13.5
15.0

Entering 6.2, I would like to find 7.9 (NOT 5.6). Please how do I do this?

I am not experienced at Visual Basic, thus please need a detailed answer.

Thank You!

Wayne


--

Dave Peterson

  #4   Report Post  
Biff
 
Posts: n/a
Default

Hi!

If your list of numbers is sorted ascending like your
example:

=INDEX(A3:A8,MATCH(A1,A3:A8,1)+1)

Biff

-----Original Message-----
I need means to locate the nearest nbr in column of nbrs

that is GREATER
than the source nbr. (Did I say that right?) VLOOKUP

finds the nearest
LOWEST.

nbr in question: 6.2
list of nbrs:
4.2
5.6
7.9
10.4
13.5
15.0

Entering 6.2, I would like to find 7.9 (NOT 5.6).

Please how do I do this?

I am not experienced at Visual Basic, thus please need a

detailed answer.

Thank You!

Wayne


.

  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

And an excellent guess, too!



Dave Peterson wrote:

This seemed to work for me. I put the data in Sheet1, A1:A6 and

=IF(ISNUMBER(MATCH(A1,Sheet1!A1:A6,0)),
INDEX(Sheet1!A1:A6,MATCH(A1,Sheet1!A1:A6,0)),
INDEX(Sheet1!A1:A6,MATCH(A1,Sheet1!A1:A6,1)+1))
(all one cell)

If it's a match, use it. If it's not a match, then find the lower number's
position and add 1--and return that one.

(I guessed an exact match should return that exact value.)

"Wayne G. Dengel" wrote:

I need means to locate the nearest nbr in column of nbrs that is GREATER
than the source nbr. (Did I say that right?) VLOOKUP finds the nearest
LOWEST.

nbr in question: 6.2
list of nbrs:
4.2
5.6
7.9
10.4
13.5
15.0

Entering 6.2, I would like to find 7.9 (NOT 5.6). Please how do I do this?

I am not experienced at Visual Basic, thus please need a detailed answer.

Thank You!

Wayne


--

Dave Peterson


--

Dave Peterson



  #6   Report Post  
Wayne G. Dengel
 
Posts: n/a
Default

Worked like a charm! Thank You!
Wayne

"Wayne G. Dengel" wrote in message
news:V3gjd.2181$bH2.536@trnddc09...
I need means to locate the nearest nbr in column of nbrs that is GREATER
than the source nbr. (Did I say that right?) VLOOKUP finds the nearest
LOWEST.

nbr in question: 6.2
list of nbrs:
4.2
5.6
7.9
10.4
13.5
15.0

Entering 6.2, I would like to find 7.9 (NOT 5.6). Please how do I do

this?

I am not experienced at Visual Basic, thus please need a detailed answer.

Thank You!

Wayne




  #7   Report Post  
Aladin Akyurek
 
Posts: n/a
Default


If the numbers are in ascending order as your sample suggests...

=INDEX($A$2:$A$7,MATCH(C1,$A$2:$A$7,1)+(LOOKUP(C1, $A$2:$A$7)<C1))

where A2:A7 houses the numbers and C1 the value to look up.

Wayne G. Dengel Wrote:
I need means to locate the nearest nbr in column of nbrs that is
GREATER
than the source nbr. (Did I say that right?) VLOOKUP finds the
nearest
LOWEST.

nbr in question: 6.2
list of nbrs:
4.2
5.6
7.9
10.4
13.5
15.0

Entering 6.2, I would like to find 7.9 (NOT 5.6). Please how do I do
this?

I am not experienced at Visual Basic, thus please need a detailed
answer.

Thank You!

Wayne



--
Aladin Akyurek
------------------------------------------------------------------------
Aladin Akyurek's Profile: http://www.excelforum.com/member.php...fo&userid=4165
View this thread: http://www.excelforum.com/showthread...hreadid=275965

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
Vlookup finds a blank, but returns a zero - HELP! flummoxed Excel Discussion (Misc queries) 6 January 18th 05 03:15 PM
Vlookup Syntax Error YV New Users to Excel 9 December 23rd 04 05:28 PM
Vlookup Question Jeff Excel Discussion (Misc queries) 2 December 2nd 04 02:40 PM
Need help with modifying VLookUp Tom Excel Discussion (Misc queries) 4 December 2nd 04 12:44 AM
vlookup. Amit Excel Worksheet Functions 2 November 3rd 04 12:34 PM


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