Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default need help creating formula

Does anyone know how to write a formula that will lookup a value and
return the next largest value?

For an example:

A B
1 100 120
2 200
3 300
4 400


I know the formula to return the value that's less than the value I am
looking up.
This is what I use =VLOOKUP(B1, A2:A4, 1, TRUE)
returns 100

How do I get it to return 200? Since 120 is between 100 and 200.

Any help is greatly appreciated!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default need help creating formula

Sort your data in A descending (400,300,200,100).
Then use this formula:

=INDEX(A1:A4,MATCH(B1,A1:A4,-1))


--
Kind regards,

Niek Otten
Microsoft MVP - Excel

wrote in message oups.com...
| Does anyone know how to write a formula that will lookup a value and
| return the next largest value?
|
| For an example:
|
| A B
| 1 100 120
| 2 200
| 3 300
| 4 400
|
|
| I know the formula to return the value that's less than the value I am
| looking up.
| This is what I use =VLOOKUP(B1, A2:A4, 1, TRUE)
| returns 100
|
| How do I get it to return 200? Since 120 is between 100 and 200.
|
| Any help is greatly appreciated!
|


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default need help creating formula

thank you, that worked!


Niek Otten wrote:
Sort your data in A descending (400,300,200,100).
Then use this formula:

=INDEX(A1:A4,MATCH(B1,A1:A4,-1))


--
Kind regards,

Niek Otten
Microsoft MVP - Excel

wrote in message oups.com...
| Does anyone know how to write a formula that will lookup a value and
| return the next largest value?
|
| For an example:
|
| A B
| 1 100 120
| 2 200
| 3 300
| 4 400
|
|
| I know the formula to return the value that's less than the value I am
| looking up.
| This is what I use =VLOOKUP(B1, A2:A4, 1, TRUE)
| returns 100
|
| How do I get it to return 200? Since 120 is between 100 and 200.
|
| Any help is greatly appreciated!
|


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
Creating a formula JMP Excel Worksheet Functions 2 December 8th 06 12:42 PM
Creating a complicated formula Cheryl Excel Worksheet Functions 3 July 19th 06 12:50 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
need help creating formula based on cell value Brad Excel Discussion (Misc queries) 3 April 1st 05 07:51 PM
Creating a specific formula booroni New Users to Excel 3 March 26th 05 10:05 AM


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

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

About Us

"It's about Microsoft Excel"