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
Bookmarks