Pergunta

All I am trying to do is return a list of Freezer Accounts that don't have a specific SKU. Here is an example of the data:

SO18071323 question example

Suppose I want to return all of the Freezer Accounts that do not have the SKU (R3552S). The result should be:

F0000563
F0002365

What is the easiest way to get this list? I tried an IF statement, then compare the tables but that doesn't seem to be working correctly. Also tried a pivot table, but not sure I know how to use it correctly. Also tried VLOOKUP.

Foi útil?

Solução

A bit tedious but fairly simple with a helper column, with =IF(COUNTIF(A:A,A2)=COUNTIFS(B:B,"<>R3552S",A:A,A2),A2,"") in it and copied down (assuming Freezer Account is in ColumnA Row1 and no gaps). Add a label to the helper column (say E in ColumnE) and select it, Data > Sort & Filter - Advanced, Copy to another location (say G1), check Unique records only. Delete G1 and Column E and sort ColumnF.

Edit re supplementary

The formula and process is relatively cumbersome even for a single SKU exclusion but seemed to match the question's requirement better than a PivotTable would have. However where there are two exclusions (or even perhaps more) a PivotTable is very much simpler and more 'powerful', though it gives visual results rather than a list of exclusions:

SO180171323 example.

The pale blue is the original answer and the darker blue the answer to the supplemental addition, so combined that is F0000563. The 'power' comes from the same table offering answers to many more questions also. For example take in account 2 SKU's could mean just F0000563 ("Which have neither?") as I have assumed but the answer (all four Freezer Accounts) is also evident for "Which do not have both?"

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top