Formula help, counting unique occurences.

J2Reed

New Member
Joined
Nov 12, 2018
Messages
19
Office Version
  1. 365
Platform
  1. Windows
I am looking for a formula that will count unique occurrences that start with W81UTH, ignoring duplicates and blank cells.
Also looking for a formula that will count unique occurrences that does NOT start with W81UTH, ignoring duplicates and blank cells.
I want to achieve the desired results below in cells D3 and D4.
EXCEL PIC.PNG
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Try this ARRAY formula (Entered with Ctrl+Shift+Enter)

Book1
ABCD
1W81UTHa1
2W81UTHa2
3W81UTHa3STARTS WITH W81UTH3
4DOES NOT START WITH W81UTH9
5W81UTHa1
6W81UTHa2
7W81UTHa3
8
9W50abcd1
10W50abcd2
11W50abcd3
12
13W50abcd1
14W50abcd2
15W50abcd3
16W50abcd4
17W50abcd5
18W50abcd6
19W50abcd7
20W50abcd8
21W50abcd9
Hoja15
Cell Formulas
RangeFormula
D3D3{=SUM(IF(FREQUENCY(IF(LEFT($A$1:$A$21,6)="W81UTH",MATCH($A$1:$A$21,$A$1:$A$21,0)),ROW($A$1:$A$21)-ROW($A$1)+1),1))}
D4D4{=SUM(IF(FREQUENCY(IF((A1:A21<>"")*(LEFT($A$1:$A$21,6)<>"W81UTH"),MATCH($A$1:$A$21,$A$1:$A$21,0)),ROW($A$1:$A$21)-ROW($A$1)+1),1))}
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
 
Upvote 0
You can try removing the duplicates in the column from the Data on the menu and then use the following.

In the formula below use the '?' as many times as the remaining text of the string. This would work if the length is same for all the cells in which the string is present.

COUNTIF(A2:A28,"W81UTH?????")

For the second thing, COUNTA(A2:A28)-the above formula
 
Upvote 0
Another approach would be using column B or any other columns as helper. In column
B1"=LEFT(A1,6)" Drag down then
D3="=COUNTIF($B$1:$B$28,"W81UTH")"
D4="=COUNTIF($A$1:$A$28,"<>")-COUNTIF($C$1:C28,"W81UTH")"

to clean it up you can just hide the Helper Column B
 
Upvote 0

Forum statistics

Threads
1,214,813
Messages
6,121,706
Members
449,048
Latest member
81jamesacct

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