Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Disregard, I found my error and the formula is working again.
-- If you never attempt anything, you will never make any mistakes...thus never enjoying the fruits of accomplishment. "T. Valko" wrote: it took me at least an hour to realize Rng1 and Rng2 meant range. Well, next time I'll try to make it more obvious. Thanks for the feedback! -- Biff Microsoft Excel MVP "Ess" wrote in message ... T. Valko, it took me at least an hour to realize Rng1 and Rng2 meant range. After the lightbulb came on, I was able to test your formulas. THEY WORK! Thank you for being the expert; it keeps up novice poeple learning. -- If you never attempt anything, you will never make any mistakes...thus never enjoying the fruits of accomplishment. "T. Valko" wrote: Try this... Sheet1 Rng1 refers to A$2A$20 Rng2 refers to B$2:B$20 Sheet2 A1 = some lookup value like GAATSPEC Enter this formula in B1. This will return the count of records for the lookup value. =COUNTIF(Rng1,A1) Enter this formula in A2. This will extract the records for the lookup value. =IF(ROWS(A$2:A2)B$1,"",INDEX(Rng2,MATCH(A$1,Rng1, 0)+ROWS(A$2:A2)-1)) Copy down to a number of cells that is at least equal to the maximum count of any lookup value. For example, if lookup value XXX appears the most times, say 10 times, then you have to copy the formula down to at least 10 cells. -- Biff Microsoft Excel MVP "Ess" wrote in message ... Yes, all the data is grouped together in a contiguous range. -- If you never attempt anything, you will never make any mistakes...thus never enjoying the fruits of accomplishment. "T. Valko" wrote: GAATSPEC...ALLERGY GAATSPEC...ASTHMA GAATSPEC...SINUS GAATSPEC...IMMUNOLOGY Is your data sorted or grouped together like above? All the GAATSPEC entries are grouped in a contiguous range? Or, is the data in random rows like this: GAATSPEC...ALLERGY XXX...yyy AAA...ooo GAATSPEC...ASTHMA -- Biff Microsoft Excel MVP "Ess" wrote in message ... I am trying to create a lookup table. I have a concatenated field on two sheets and want all the values that match that field to be populated on one of the sheets. Example: Sheet 1 (flat file) Concat field Name GAATSPEC ALLERGY GAATSPEC ASTHMA GAATSPEC SINUS GAATSPEC IMMUNOLOGY SHEET 2 (results file) Concat field Name GAATSPEC In essence, whenever I select "GAATSPEC" on the second sheet, I want it to automatically populate with the matching name. My problem is a Vlookup only gives me the first row (i.e., GAATSPEC - ALLERGY). How do I get all the other rows to populate with a name? Is this doable? -- If you never attempt anything, you will never make any mistakes...thus never enjoying the fruits of accomplishment. . . . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VLOOKUP using a dynamic range | Excel Discussion (Misc queries) | |||
Vlookup - dynamic range reference? | Excel Discussion (Misc queries) | |||
Dynamic range for Table_array in a VLOOKUP. | Excel Worksheet Functions | |||
Urgent Dynamic Range with Vlookup | Excel Discussion (Misc queries) | |||
Dynamic Range for Function (Vlookup etc) | Excel Worksheet Functions |