+ Reply to Thread
Results 1 to 3 of 3

Pull words with consonant position SAME

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,618

    Pull words with consonant position SAME

    I have this on a and b

    NOTAIRE OTARINE
    ELATION TOENAIL
    IODATES TOADIES
    ATELIER REALTIE
    AERIEST SERIATE
    ACONITE ANOETIC
    ARGONON ORGANON

    I want the macro to pull words like ARGONON AND ORGANON to d and e

    For they have same consonant positio , the R is at second place the G at 3rd and N 5 and 7 , consonant positions can differ but should be same on both pairs
    Last edited by makinmomb; 07-21-2022 at 04:55 AM.

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Pull words with constant consonant position

    You could do this with a formula but here's the VBA solution you asked for:

    Public Sub CheckConsonantOrder()
    
    Const VOWELS = "AEIOU"
    
    Dim lastRow As Long
    Dim thisRow As Long
    Dim v As Long
    Dim a
    
    lastRow = Cells(Rows.Count, "A").End(xlUp).Row
    For thisRow = 1 To lastRow
        a = Cells(thisRow, "A").Resize(1, 2).Value
        For v = 1 To Len(VOWELS)
            a(1, 1) = Replace(a(1, 1), Mid(VOWELS, v, 1), "*")
            a(1, 2) = Replace(a(1, 2), Mid(VOWELS, v, 1), "*")
        Next v
        With Cells(thisRow, "D").Resize(1, 2)
            If a(1, 1) = a(1, 2) Then
                .Value = .Offset(0, -3).Value
            Else
                .ClearContents
            End If
        End With
    Next thisRow
    
    End Sub
    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,618

    Re: Pull words with consonant position SAME

    Wideboy working as intended , thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Pull words where Y is replaced vowel same position
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 03-21-2022, 12:14 PM
  2. consonant pull by ALPHA
    By makinmomb in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-22-2021, 02:21 PM
  3. [SOLVED] pull out desired CONSONANT
    By makinmomb in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-15-2021, 03:35 PM
  4. [SOLVED] Macro to pull same consonant words
    By makinmomb in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 11-05-2017, 10:37 AM
  5. Macro to pull same consonant words
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-02-2017, 06:18 AM
  6. [SOLVED] words with repeat consonant
    By makinmomb in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-06-2017, 02:38 AM
  7. [SOLVED] Splitting word list based on syllabic structure, CVC (consonant/vowel/consonant) etc
    By Jay Bee in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-23-2013, 10:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1