I'm trying to find out how many clients each of my colleagues are working on, which will then be used for other calculations. My spreadsheet has a column with the initials of each colleague, separated by commas (which I don't have any control over), and currently I can click and drag the formula
=COUNTIF(SPLIT($B2, ", "), "NameHere")
,
which works quite nicely. However, I need to convert this to an arrayformula and in doing so everything breaks. What appears to be happening is that the COUNTIF is counting through the entire 2D array created by SPLIT(ARRAY, ", "), and giving a single total sum, but I would like it to count through each row, one at a time, with a sum for each row.
I've attached a spreadsheet, with the attempted arrayformula in cell O2.
(As an aside, a simpler solution would appear to be search the initials column for the colleagues initials, as they're set up to be unique, but one colleague has the initial "J" and so would appear within "LJ", and I can't see a way around this with wildcards.)