Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Lookup Based on Next Smallest Number

I have three columns of data

Column A Column B Column C
247,156 247,156 .40
0 247,156 .40
0 247,156 .40
245,156 494,312 .70
247,156 741,468 .30

Column B is a running total of column A.

I need to extract the value from column C based on where a value falls
within the ranges identified in column B.

For example, if the criteria value is 500,000, I would want to extract .70.
If the criteria value is 230,000, I would want to extract .40. If the
criteria value is 750,000, I would want to extract .30.

Is the following formula the best way to get this data:

Hlookup(large(b1:b5,countif(b1:b5,""&d1)+1),b1:c5 ,2,false)

Will I have a problem with this formula since column B has 3 values that are
equal?

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,688
Default Lookup Based on Next Smallest Number

Based on your sample data it appears that the value in column B is *always*
increasing or the same so in effect it is sorted ascending. So, try this:

=IF(D1="","",IF(D1<B1,C1,VLOOKUP(D1,B1:C5,2)))

Biff

"M Moore" wrote in message
...
I have three columns of data

Column A Column B Column C
247,156 247,156 .40
0 247,156 .40
0 247,156 .40
245,156 494,312 .70
247,156 741,468 .30

Column B is a running total of column A.

I need to extract the value from column C based on where a value falls
within the ranges identified in column B.

For example, if the criteria value is 500,000, I would want to extract
.70. If the criteria value is 230,000, I would want to extract .40. If
the criteria value is 750,000, I would want to extract .30.

Is the following formula the best way to get this data:

Hlookup(large(b1:b5,countif(b1:b5,""&d1)+1),b1:c5 ,2,false)

Will I have a problem with this formula since column B has 3 values that
are equal?

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
How to determine the number of units based on given condition? Eric Excel Worksheet Functions 3 March 6th 06 09:22 AM
smallest missing number Chris_t_2k5 Excel Discussion (Misc queries) 6 February 16th 06 07:22 PM
Changing chart color based on number entered confused chart girl Charts and Charting in Excel 0 October 27th 05 05:26 PM
Creating a certain number of entries based on a number in a cell PPV Excel Worksheet Functions 4 June 16th 05 10:25 PM
double lookup, nest, or macro? Josef.angel Excel Worksheet Functions 1 October 29th 04 09:50 AM


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