Find cells that contain alliteration

ollyhughes1982

Well-known Member
Joined
Nov 27, 2018
Messages
718
Office Version
  1. 365
Platform
  1. MacOS
Hi,

Re the below screenshot, would anybody please be able to advise how to find and count cells in a particular column that contain alliteration. In this example, manually counting shows that the result should be 6. Cardiff parkrun, Newport parkrun and Sharpham Fields Road parkrun do not contain alliteration, the other 6 do.

Screenshot 2021-12-06 at 17.55.19.png

I've tried a few things, but nothing is working.

Thanks in advance.

Olly.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
How about this?

New__Document (11).xlsx
ABCDE
1NameHelper ColumnAlliteration Count:6
2Bannockburn Bush parkrun1
3Batemans Bay parkrun1
4Benalla Botanical Gardens parkrun1
5Bendigo Botanic Gardens parkrun1
6Cardiff parkrun0
7Newport parkrun0
8Pakapakanthi parkrun1
9Parkville parkrun1
10Sharpham Fiels Road parkrun0
Sheet3
Cell Formulas
RangeFormula
E1E1=SUM(B2:B10)
B2:B10B2=LET(s,UPPER(LEFT(FILTERXML("<i><I>" & SUBSTITUTE(A2," ","</I><I>") & "</I></i>","//I"),1)),o,INDEX(s,SEQUENCE(COUNTA(s),,2)),SUM(IFERROR((s=o)+0,0)))
 
Upvote 0
Filterxml is not available on a Mac, it's PC only.
 
Upvote 0
However borrowing your formula, this seems to work
Excel Formula:
=LET(Txt," "&A2&" ",Qty,SEQUENCE((LEN(Txt)-LEN(SUBSTITUTE(Txt," ","")))-1),l,LEFT(REPLACE(LEFT(Txt,FIND("~",SUBSTITUTE(Txt," ","~",Qty+1))-1),1,FIND("~",SUBSTITUTE(Txt," ","~",Qty)),""),1),o,INDEX(l,SEQUENCE(COUNTA(l),,2)),SUM(IFERROR((l=o)+0,0)))
 
Upvote 0
Solution
Brilliant. Two heads are better than one! Thanks so much, both. If I hit any trouble, I'll get back in touch.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
That needs to go in a helper column copied down & then sum the helper column.
 
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,395
Members
449,446
Latest member
CodeCybear

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