Solved

Build a short list based on criteria applied to long list

Posted on 2013-12-31
4
390 Views
Last Modified: 2014-01-17
Experts, ok so  I have a partial list of products in Col A (result set).
There are many duplicate products in the result set (which is ok)

In Col B I have a master list of all products (no duplicates here).

In Col C I have a formula that counts how many times each of the products in the complete list appears in the result set.

Now I want to build a unduplicated short list of just those products from the master list that occur one or more times in Col A.

In SQL no problem, I would just select distinct Col A from Worksheet

Or I would Select Col B  from Worksheet where Col C > 0  

How do I achieve the same results using a formula in Excel (without any sql)?


Thanks in advance.
0
Comment
Question by:bobinorlando
  • 2
  • 2
4 Comments
 
LVL 81

Accepted Solution

by:
byundt earned 500 total points
ID: 39749267
You can build your list with an array-entered formula like:
=IFERROR(INDEX(B$1:B$1000,SMALL(IF(ISNUMBER(MATCH(B$1:B$1000,A$1:A$100,0)),ROW(B$1:B$1000)-ROW(B$1)+1,""),ROWS(C$1:C1))),"")
This formula will return an empty string (looks like a blank) once the list of unique values in both lists is exhausted.

To array-enter a formula:
1)  Select the cell
2)  Click in the formula bar
3)  Hold the Control and Shift keys down, then hit Enter
4)  Release all three keys
Excel should respond by adding curly braces { } surrounding your formula. If you don't see them, repeat steps 1 through 4

Note: although the range references may extend beyond your data, array formulas like this one will take a long time to calculate if you use entire columns.
0
 
LVL 81

Expert Comment

by:byundt
ID: 39749282
If you have Excel 2010 or later, you can use the AGGREGATE function in a formula that doesn't need to be array-entered:
=IFERROR(INDEX(A$1:A$100,AGGREGATE(15,6,MATCH(B$1:B$1000,A$1:A$100,0),ROWS(C$1:C1))),"")
0
 
LVL 8

Expert Comment

by:itjockey
ID: 39778359
what if ? if list Column A is master & Column B is common list  & want to find values in column C which is not in B but it is in A? list view?

Thanks
0
 
LVL 8

Expert Comment

by:itjockey
ID: 39778367
if you go ahead  better read this  - I had use this formula
=IF(ISNA(VLOOKUP(A2,$B$2:$B$500,1,FALSE)),A2,"")

Open in new window

but is not like list view. & this is not my question, some asked & I solved but he wants in list view & I cant .....so if you feel so pls provide me ....
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question