LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,180
Default Looking Up Datas when Key Values are Identical

Assume your data with headers looks like this:
Who Spec Size
Frank MEP2 2
Frank IAEMID 248
Frank GABELLI 248
Frank GABELLI 2
Frank ML 248
Frank CSFB 248
SAM ML 2
SAM UBS 4

Create a Pivot Table..
Layout: Drag Who and Spec into Row, Sum of Size into Data.
Options: Uncheck Grand Totals, AutoFormat.
The PT should look like this:

Who Spec Total
Frank CSFB 248
GABELLI 250
IAEMID 248
MEP2 2
ML 248
SAM ML 2
UBS 4

Notice GABELLI appears only once and has a total of 248+2=250
Pivot Table was used only for this one purpose.

If Who in the PT is located at A20, WhoS is at D20

WhoS Spec_S Cats
Frank CSFB-248, CSFB-248,
Frank GABELLI-250, CSFB-248,GABELLI-250,
Frank IAEMID-248, CSFB-248,GABELLI-250,IAEMID-248,
Frank MEP2-2, CSFB-248,GABELLI-250,IAEMID-248,MEP2-2,
Frank ML-248, CSFB-248,GABELLI-250,IAEMID-248,MEP2-2,ML-248,
SAM ML-2, ML-2,
SAM UBS-4, ML-2,UBS-4,

The formulas for WhoS, Spec_S and Cats are respectively
=IF(A21="",D20,A21)
=B21&"-"&C21&","
=IF(A21="",F20&E21,E21)
Name the columns with the suggested names.

Create and name 2 cells:
Target Result
Frank CSFB-248,GABELLI-250,IAEMID-248,MEP2-2,ML-248,

Enter the name you want to look up into Target
The Result formula is:
=INDEX(Cats,MATCH(Target,WhoS,0)+COUNTIF(WhoS,Targ et)-1)

 
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
List of values office guy10 Excel Discussion (Misc queries) 2 September 22nd 06 07:28 PM
Referencing a specific number to more general values in a table. AJL Excel Worksheet Functions 0 September 19th 06 05:11 PM
values not appearing in autofilter list maryj Excel Discussion (Misc queries) 5 September 13th 06 10:38 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
How do I match identical values in 2 columns and then sort? Godswatch Excel Discussion (Misc queries) 1 November 9th 05 06:55 PM


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