SOLVED

filtering multiple items

Copper Contributor

I have a list of over 5,000 Purchase order numbers. Each Purchase order can have a variety of different account codes attached to it. There are 14 account codes. I would like to Identify Purchase orders that only have one account code and that one  account code needs to be(6000, 6100 or 6200). For Example in the table below  Purchase order 3 and 7  would qualify as a purchase order with 1 account code where the code equals one 6000,6100 or 6200. I would also like the ability to Identify purchase orders that contain account code (6000, 6100 or 6200) and any combination of the other 11 account codes. So for example Purchase order 1,2 and 4 are examples of purchase orders that contains account code (6000,6100, or 6200) and any combination of the other 11 accounts.

 

 

Purchase Order No     Acct Cd               Sum of Amt
121009624.26
1220014209.52
160009001.25
261003624.93
2220026953.98
362001750.5
460001425.67
4220035491.18
424002450.15
5600040.5
6220012901.04
624004593.94
62500833.9
76000200
82400486.39

 

 

 

 

5 Replies
best response confirmed by dw700d (Copper Contributor)
Solution

@dw700d 

See the attached sample workbook.

 

S0689.png

Thank you Hans this helps a great deal. The accounts codes are actually 6121.219M, 6231.167M ,6722.99,6726.99. I am experiencing challenges trying to replicate your formula for type 2. Are you able to rewrite the formula for me with the account codes below
6121.219M
6231.167M
6722.99
6726.99

Thank you for your help

@dw700d 

Are the latter two text values or number values?

all four values are considered text

@dw700d 

Thank you. The formula in D2 becomes

 

=AND(COUNTIF($A$2:$A$16,$A2)=1,OR(B2={"6121.219M","6231.167M","6722.99","6726.99"}))

 

and that in E2:

 

=SUM(COUNTIFS($A$2:$A$16,$A2,$B$2:$B$16,{"6121.219M","6231.167M","6722.99","6726.99"}))*COUNTIFS($A$2:$A$16,$A2,$B$2:$B$16,"<>6121.219M",$B$2:$B$16,"<>6231.167M",$B$2:$B$16,"<>6722.99",$B$2:$B$16,"<>6726.99")>0

1 best response

Accepted Solutions
best response confirmed by dw700d (Copper Contributor)
Solution

@dw700d 

See the attached sample workbook.

 

S0689.png

View solution in original post