#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Sort then lookup

I am trying to create a lookup function that locates the max value in
column A and then identifies the value in the same row of column B. But
the trick is that I need the max value in column A that has a value in
the same row as column B that is greater than zero. So there are 2
rules that need to be met in the lookup function.

A B

2.89 -206,072,627.00
3.08 -173,714,739.00
13.52 -183,189,686.00
15.50 -149,160,742.00
43.84 -32,308,509.00
357,778,994.23 10,251,638.00
359,474,629.25 0.00


In the example above I would be trying to capture the value
10,251,638.00 via some lookup function.

Any thoughts on how to do this?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Sort then lookup

Try this *array* formula:

=LOOKUP((MAX(IF(B1:B7<0,A1:A7))),A1:B7)

--
Array formulas must be entered with CSE, <Ctrl <Shift <Enter, instead of
the regular <Enter, which will *automatically* enclose the formula in curly
brackets, which *cannot* be done manually. Also, you must use CSE when
revising the formula.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Steve" wrote in message
oups.com...
I am trying to create a lookup function that locates the max value in
column A and then identifies the value in the same row of column B. But
the trick is that I need the max value in column A that has a value in
the same row as column B that is greater than zero. So there are 2
rules that need to be met in the lookup function.

A B

2.89 -206,072,627.00
3.08 -173,714,739.00
13.52 -183,189,686.00
15.50 -149,160,742.00
43.84 -32,308,509.00
357,778,994.23 10,251,638.00
359,474,629.25 0.00


In the example above I would be trying to capture the value
10,251,638.00 via some lookup function.

Any thoughts on how to do this?


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
sorting data on protected worksheet Sue Excel Discussion (Misc queries) 20 November 7th 06 07:31 PM
How can I sort multiple times Sorting data Excel Worksheet Functions 2 February 9th 06 05:22 PM
Filter, sort, lookup from other sheet falloutx Excel Discussion (Misc queries) 2 January 18th 06 04:36 PM
A sort of lookup or match lehigh46 Excel Worksheet Functions 1 February 26th 05 02:47 AM
Lookup and Sort Question Josh O. Excel Discussion (Misc queries) 7 December 9th 04 08:18 PM


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