Counting multiple initials in 1 cell

gixered

New Member
Joined
Sep 13, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Hi everyone,

Really useful forum, have used your resources many times, but 1st time posting

I have put together an excel sheet to calculate human resources
The idea being i put each person's initials in a cell and use

+ COUNTIF(K3:K121, "each person initials")
e.g.
=COUNTIF(K3:K121, "AA") + COUNTIF(K3:K121, "AG") + COUNTIF(K3:K121, "AP") + COUNTIF(K3:K121, "DK") + COUNTIF(K3:K121, "EM") + COUNTIF(K3:K121, "LA") + COUNTIF(K3:K121, "MP") + COUNTIF(K3:K121, "MS")

And so on for every person
This is long-winded, but it works great

My problem is that if I add 2 sets of initials into 1 cell, not only does it not count the extra initials, it deduces the cells count
i.e.
Cell K4
AA AG

How do I count 2 sets of initials in 1 cell, please?

Cheers
Mark
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Welcome to Mr Excel, Mark (y)

There are a few easier ways to do what you're attempting that writing such a long formula. As long as it is always 2 initials, separated by a space when there are multiple sets in one cell then the easiest way would be to have a separate list of initials elsewhere in the sheet (or in another hidden sheet, entirely your choice) then use that list as a reference as below.

As with many things that we come across on the forum, if there are differences between the example provided and the actual format of your data then a different approach may be needed but hopefully this will get you going.

Book1
KLM
1List to countList of each persons initials
2
3AAAA
4EMAK
5AKEM
6MP EMMP
7
8
9Count result5
Sheet1
Cell Formulas
RangeFormula
L9L9=SUM(COUNTIF($K$3:$K$6,"*"&$M$3:$M$6&"*"))
 
Upvote 0
Welcome to the MrExcel board!

If you are just trying to count the number of peoples initials (no matter how many initials a person has) then here are a couple of other options

22 09 13.xlsm
KLM
1List to count
2
3AA
4EM EJMW
5AK
6MP EM ABC DE
7
8
9Count result8If you have latest TEXT functions
108If not
Count Initials
Cell Formulas
RangeFormula
L9L9=COLUMNS(TEXTSPLIT(TEXTJOIN(" ",1,K3:K6)," "))
L10L10=LET(s,TEXTJOIN(" ",1,K3:K6),LEN(s)-LEN(SUBSTITUTE(s," ",""))+1)


If neither of us has solved your problem then please consider giving us some dummy (but representative) sample data and expected results with XL2BB and explain agin in relation to that sample data
 
Upvote 0

Forum statistics

Threads
1,214,541
Messages
6,120,110
Members
448,945
Latest member
Vmanchoppy

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