Two consecutive consonants in a name and surname

Zéev2020

New Member
Joined
Apr 26, 2019
Messages
2
What formula can I use to identify two consecutive consonants in the name and surname columns.eg name Ndoluvo and surname Khaye formula should identify any two consecutive consonants the name and surname starts with
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
[TABLE="class: grid, width: 750"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]First Name[/TD]
[TD]Last Name[/TD]
[TD]Consecutive Consonants First Name[/TD]
[TD]Consecutive Consonants Last Name[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Ndoluvo[/TD]
[TD]Khaye[/TD]
[TD]TRUE[/TD]
[TD]TRUE[/TD]
[/TR]
</tbody>[/TABLE]


Using the formula in C2:
=NOT(OR(IFERROR(SEARCH("a",LEFT(A2,2)),FALSE),IFERROR(SEARCH("e",LEFT(A2,2)),FALSE),IFERROR(SEARCH("I",LEFT(A2,2)),FALSE),IFERROR(SEARCH("o",LEFT(A2,2)),FALSE),IFERROR(SEARCH("u",LEFT(A2,2)),FALSE)))

And in D2:
=NOT(OR(IFERROR(SEARCH("a",LEFT(B2,2)),FALSE),IFERROR(SEARCH("e",LEFT(B2,2)),FALSE),IFERROR(SEARCH("I",LEFT(B2,2)),FALSE),IFERROR(SEARCH("o",LEFT(B2,2)),FALSE),IFERROR(SEARCH("u",LEFT(B2,2)),FALSE)))
 
Upvote 0
Or if you want a more dynamic and shorter formula you can use these in Cells C2 & D2:

C2:
=IF(SUMPRODUCT(--NOT(ISERR(SEARCH({"a";"e";"I";"o";"u"},LEFT(A2,2)))))=0,TRUE,FALSE)

D2:
=IF(SUMPRODUCT(--NOT(ISERR(SEARCH({"a";"e";"I";"o";"u"},LEFT(B2,2)))))=0,TRUE,FALSE)
 
Upvote 0
How about:

=IF(ISNUMBER(SEARCH({"a";"e";"i";"o";"u"},MID(A2,1,2))),"No","Yes")
 
Upvote 0
How about:

=IF(ISNUMBER(SEARCH({"a";"e";"i";"o";"u"},MID(A2,1,2))),"No","Yes")


Or if you want a more dynamic and shorter formula you can use these in Cells C2 & D2:
=IF(SUMPRODUCT(--NOT(ISERR(SEARCH({"a";"e";"I";"o";"u"},LEFT(A2,2)))))=0,TRUE,FALSE)

Hi

I tried both formulas for

aabb
bbaa

both have 2 consecutive consonants but I get in both different results for the 2 strings.
Please confirm.
 
Upvote 0
Hi pgc,

The poster initially stated: "identify any two consecutive consonants the name and surname starts with"

emphasis on the "starts with" hence the LEFT function of the first 2 characters.

It will return false for aabb and true for bbaa because of that logic. It's looking at "aa" and then "bb" respectively. It is true that there are 2 consecutive consonants in both strings, but the criteria of the poster has made my formula ignore any characters after the 2nd.
 
Upvote 0
Hi Dante, that formula only works if the first 2 letters contain an "a" - just to let you know.


Thanks tyija1995, I appreciate the comment.

Please try the following:

=IF(SUM(ISNUMBER(SEARCH({"a";"e";"i";"o";"u"},MID(A2,1,2)))+0)>0,"No","Yes")
 
Upvote 0
Hi pgc,

The poster initially stated: "identify any two consecutive consonants the name and surname starts with"

emphasis on the "starts with" hence the LEFT function of the first 2 characters.

It will return false for aabb and true for bbaa because of that logic. It's looking at "aa" and then "bb" respectively. It is true that there are 2 consecutive consonants in both strings, but the criteria of the poster has made my formula ignore any characters after the 2nd.

Thank you.
You are right.

I read "identify any two consecutive consonants the name" and did not read the "starts with".
Will pay more attention next time (I hope ;) )
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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