Counting Unique text values based on 1 and/or 2 criteria - other options didnt work.

Alessandro05

New Member
Joined
Sep 26, 2013
Messages
12
Contract #Unique IdVendor NameBusiness UnitReal/Assigned CW IDCustom Unique IDSent To Legal
CW1268Vendor 1SalesRealVendor 1 CW1 268Yes
CW25453Vendor 2OpsNot AvailableVendor 2 CW 2No
CW1 89374Vendor 1OpsNot AvailableVendor 1 CW 1 89374Yes
CW45675Vendor 4OpsNot AvailableVendor 4 CW 4Yes
CW5521Supplier 1OpsRealSupplier 1 CW 5Yes
CW6595Supplier 2SalesRealSupplier 2 CW 6Yes

<tbody>
</tbody>
Hello, Need help for work... been trying for two days.....
-I am looking to count the unique values in column 1 (Contract #) that have been sent to the Legal department. The correct answer is 4 (Lines 1, 4, 5, & 6)
See... each line is a different file but not a different contract per se. I want to count the number of contracts and no the number of lines so if a contract ID shows up in column A more than once... it should only be counted once.
So columns a and G are the areas of focus. Can anyone help?
This must be a formula as the line items will continuously grow

Thanks so much for helping me

<tbody>
</tbody>
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Try the following formula, which needs to be confirmed with CONTROL+SHIFT+ENTER...

=SUM(IF(FREQUENCY(IF(G2:G7="Yes",IF(LEN(A2:A7)>0,MATCH("~"&A2:A7,A2:A7&"",0))),ROW(A2:A7)-ROW(A2)+1)>0,1))

Also, if you convert your data into a Table (Ribbon > Insert > Table), the range will automatically be adjusted as data is added/removed.

Hope this helps!
 
Last edited:
Upvote 0
Thanks for the quick reply. I am getting the same error. I been researching the web and a few examples are similar to yours.

=SUM(IF(FREQUENCY(IF(M11:M50 ="Yes",IF(LEN(G11:G50)>0,MATCH("~"&G11:G50,G11:G50&"",0))),ROW(G11:G50)-ROW(G11)+1)>0,1))

I used the above where Column G houses the "contract numbers" and column M houses the "Sent To Legal" The list is currently sitting from rows 11 through 50.
I am not understanding the "-Row(G11)" as pect of the formula either. Thanks again Domenic as this is work related and really getting to me!
 
Upvote 0
Did you confirm the formula with CONTROL+SHIFT+ENTER, not just ENTER? If done correctly, Excel will automatically place curly braces {...} around the formula.
 
Upvote 0
IT NOW WORKS. THANKS SO MUCH. The above formula works perfectly. Just need to reference the correct G11 and not G10:ROFLMAO:
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,890
Messages
6,127,596
Members
449,386
Latest member
owais87

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top