Find cells that contain alliteration

ollyhughes1982

Well-known Member
Joined
Nov 27, 2018
Messages
677
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

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
@Fluff, I was trying to recreate your formula to try and understand it. Ended up with the formula below which was a good bit shorter. Thought it might interest you. Again, very cool solution. I can add this skill to my toolbox thanks to you. Cheers.

Excel Formula:
=LET(x,MID(A2,FIND("~",SUBSTITUTE(" "&A2&" "," ","~",SEQUENCE((LEN(A2)-LEN(SUBSTITUTE(A2," ","")))+1))),1),y,INDEX(x,SEQUENCE(COUNTA(x),,2)),SUM(IFERROR((x=y)+0,0)))
 
Upvote 0
Hi both. I was just about to message again. A minor thing: is there a way to have it so if the result is negative it shows as blank, rather than 0? Thanks.
 
Upvote 0
How about

Excel Formula:
=LET(x,MID(A2,FIND("~",SUBSTITUTE(" "&A2&" "," ","~",SEQUENCE((LEN(A2)-LEN(SUBSTITUTE(A2," ","")))+1))),1),y,INDEX(x,SEQUENCE(COUNTA(x),,2)),s,SUM(IFERROR((x=y)+0,0)),IF(s=0,"",s))
 
Upvote 0
How about

Excel Formula:
=LET(x,MID(A2,FIND("~",SUBSTITUTE(" "&A2&" "," ","~",SEQUENCE((LEN(A2)-LEN(SUBSTITUTE(A2," ","")))+1))),1),y,INDEX(x,SEQUENCE(COUNTA(x),,2)),s,SUM(IFERROR((x=y)+0,0)),IF(s=0,"",s))
Thanks. That did the trick
 
Upvote 0
Hi again both. I am now incorporating the formula into my full spreadsheet and am struggling to get it to work. My range column is B, so changed from A to B in the formula. The helper column is now BF, rather than B. How would I amend it so that it works with this, please?

=LET(x,MID(B2,FIND("~",SUBSTITUTE(" "&B2&" "," ","~",SEQUENCE((LEN(B2)-LEN(SUBSTITUTE(B2," ","")))+1))),1),y,INDEX(x,SEQUENCE(COUNTA(x),,2)),s,SUM(IFERROR((x=y)+0,0)),IF(s=0,"",s))

Thanks.
 
Upvote 0
Here are some screenshots of the layout, if you struggle to open the file.

Event List, in column B:
Main List.jpg


Where I need the formula, in column BF:
Alliteration.jpg


Thanks again.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,426
Members
448,961
Latest member
nzskater

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