Count Unique Data Sets Over Multiple Columns

AVO

New Member
Joined
May 30, 2023
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I am struggling to create a formula that returns a singular count for data sets over 2 columns (that are multiple columns away from each other).

I want the formula to count something only if:
  • It is only counting any number in Column A once.
  • It is also only counting the unique number in column A if it can then select a specific piece of text in Column C (out of a string of text).
For the example below, I would like a return count of 3, with the example criteria (from the above dot points) being that there are 3 unique numbers in column A, that also have the word 'Good' contained in Column C.

I would also require this formula to factor in blank cells, and not count any blank cells in the selected column ranges!

1685447105442.png


Any help would be greatly appreciated.

I have tried PRODUCTSUMS and SUMS combined with COUNTIFS and IFS but cant quite get it to work...

Thank you.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi,

I am struggling to create a formula that returns a singular count for data sets over 2 columns (that are multiple columns away from each other).

I want the formula to count something only if:
  • It is only counting any number in Column A once.
  • It is also only counting the unique number in column A if it can then select a specific piece of text in Column C (out of a string of text).
For the example below, I would like a return count of 3, with the example criteria (from the above dot points) being that there are 3 unique numbers in column A, that also have the word 'Good' contained in Column C.

I would also require this formula to factor in blank cells, and not count any blank cells in the selected column ranges!

View attachment 92545

Any help would be greatly appreciated.

I have tried PRODUCTSUMS and SUMS combined with COUNTIFS and IFS but cant quite get it to work...

Thank you.
Update to the above (if it makes a difference), If an item appears once, its data will always be the same (ie: '1' will always have 'Very Good' in the other column)
 
Upvote 0
Could you clarify your problem a little more, please?
if it can then select a specific piece of text in Column C (out of a string of text).
When you mention "specific piece of text" are you referring to a whole word, a phrase consisting of more than one word, a letter, multiple letters, etc.? I believe you are referring to a single word, but it's not clear.

Also, is there any relationship between the numbers in Column A and the text in Column C? For example, you mentioned that "1" in col A will always have "Very Good" in col C. Are there similar rules for other numbers?

Does column C always contain an item from a list of potential items, or are the possibilities for col C unlimited? If there is a standard list of col C items, what does it look like?

Do you want the reported count to be the maximum of potentially multiple unique combinations? For example, "rotten" appears for numbers 3 and 4, so would have a count of 2. Why is 2 not a legitimate answer?
 
Upvote 0
For the example below, I would like a return count of 3, with the example criteria (from the above dot points) being that there are 3 unique numbers in column A, that also have the word 'Good' contained in Column C.
Give this a try

23 06 06.xlsm
ABCDEF
11Very GoodGood3
2Rotten2
33Slightly Rotten
45Kind of Good
5
61Very Good
72Good
84Partly Rotten
9
103Slightly Rotten
11
122Good
Count AVO
Cell Formulas
RangeFormula
F1:F2F1=SUMPRODUCT(--ISNUMBER(SEARCH(E1,C$1:C$12)),--(MATCH(A$1:A$12&"|"&C$1:C$12,A$1:A$12&"|"&C$1:C$12,0)=ROW(A$1:A$12)-ROW(A$1)+1))
 
Upvote 0
With the sample data below, the formula in my previous post would return 4 for "Good" because of the addition of row 2 data despite the word "Good" not appearing in that row.
If that sort of "word within a word" scenarion might be possible for you and you don't want to include the longer word in the count, then try this adaptation.

23 06 06.xlsm
ABCDEF
11Very GoodGood3
26Extra GoodnessRotten2
33Slightly Rotten
45Kind of Good
5
61Very Good
72Good
84Partly Rotten
9
103Slightly Rotten
11
122Good
Count AVO (2)
Cell Formulas
RangeFormula
F1:F2F1=SUMPRODUCT(--ISNUMBER(SEARCH(" "&E1&" "," "&C$1:C$12&" ")),--(MATCH(A$1:A$12&"|"&C$1:C$12,A$1:A$12&"|"&C$1:C$12,0)=ROW(A$1:A$12)-ROW(A$1)+1))
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

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