Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
uw805
 
Posts: n/a
Default Compound Lookup, Large/Small, Match...

I have a large spreadsheet, and I am looking for a formula to help me find
some values...

My spreadsheet has about 5,000 rows and 200 columns. I am looking for a
formula that will look up Large/Small values in column X, verify a condition
in column CD, and return the value in column E for that row. For example:

"Find the second largest value in column X, excluding any rows in which
column CD is greater than 10, and return the value in column E for that row."

One issue is that I can't sort the range at all, and I can't change the
order of the columns, so it has to be able to find these values in place.

Any suggestions? I thought something using Lookup, Sumproduct, or Match
might work, but I can't figure it out. Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Miguel Zapico
 
Posts: n/a
Default Compound Lookup, Large/Small, Match...

For the part of finding the values, you can use array formulas like this:
=LARGE(--(CD1:CD500010)*X1:X5000,2)
Enter it with Ctrl+Shift+Enter. This will find the second large value on
column X with the condition on column CD.
The thing about locating it in the row where it happens can be done with a
formula like this in column E
=IF(AND(CD110,X1=Result),X1,"")
Where Result is the cell where you have the result of the previous formula.

Hope this helps,
Miguel.

"uw805" wrote:

I have a large spreadsheet, and I am looking for a formula to help me find
some values...

My spreadsheet has about 5,000 rows and 200 columns. I am looking for a
formula that will look up Large/Small values in column X, verify a condition
in column CD, and return the value in column E for that row. For example:

"Find the second largest value in column X, excluding any rows in which
column CD is greater than 10, and return the value in column E for that row."

One issue is that I can't sort the range at all, and I can't change the
order of the columns, so it has to be able to find these values in place.

Any suggestions? I thought something using Lookup, Sumproduct, or Match
might work, but I can't figure it out. Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default Compound Lookup, Large/Small, Match...

For the second largest...

=INDEX(E2:E100,MATCH(LARGE(IF(CD2:CD100<"",IF(CD2 :CD100<=10,X2:X100)),2)
,IF(CD2:CD100<"",IF(CD2:CD100<=10,X2:X100)),0))

....confirmed with CONTROL+SHIFT+ENTER

For the second smallest...

=INDEX(E2:E100,MATCH(SMALL(IF(CD2:CD100<"",IF(CD2 :CD100<=10,X2:X100)),2)
,IF(CD2:CD100<"",IF(CD2:CD100<=10,X2:X100)),0))

....confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

In article ,
uw805 wrote:

I have a large spreadsheet, and I am looking for a formula to help me find
some values...

My spreadsheet has about 5,000 rows and 200 columns. I am looking for a
formula that will look up Large/Small values in column X, verify a condition
in column CD, and return the value in column E for that row. For example:

"Find the second largest value in column X, excluding any rows in which
column CD is greater than 10, and return the value in column E for that row."

One issue is that I can't sort the range at all, and I can't change the
order of the columns, so it has to be able to find these values in place.

Any suggestions? I thought something using Lookup, Sumproduct, or Match
might work, but I can't figure it out. Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
uw805
 
Posts: n/a
Default Compound Lookup, Large/Small, Match...

Thanks for the suggestions. I'll try these tomorrow at work and post here if
I have any problems or questions. I appreaciate the help.

"uw805" wrote:

I have a large spreadsheet, and I am looking for a formula to help me find
some values...

My spreadsheet has about 5,000 rows and 200 columns. I am looking for a
formula that will look up Large/Small values in column X, verify a condition
in column CD, and return the value in column E for that row. For example:

"Find the second largest value in column X, excluding any rows in which
column CD is greater than 10, and return the value in column E for that row."

One issue is that I can't sort the range at all, and I can't change the
order of the columns, so it has to be able to find these values in place.

Any suggestions? I thought something using Lookup, Sumproduct, or Match
might work, but I can't figure it out. 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
Double and Multiple Lookup Using the MATCH Function Charles793 Excel Worksheet Functions 0 May 11th 06 01:46 PM
Match Index Lookup Kevin Excel Discussion (Misc queries) 1 March 17th 06 04:40 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Complex LookUp / Match Problem ?? carl Excel Worksheet Functions 2 May 2nd 05 08:53 PM
Lookup then Match and insert value from next column Tenacity Excel Worksheet Functions 3 March 4th 05 02:49 AM


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