Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Sub ListPhrases()

Dim rng As Range


Dim cl As Object
Dim arrPhrases() As String
Dim x, c As Integer

'Change "A1" to the first cell where sentences occur to test


Set rng = Range("A1", Range("A1212").End(xlDown))

For Each cl In rng


arrPhrases = Split(cl.Value, ",")
c = 1
For x = 0 To UBound(arrPhrases)
If InStr(arrPhrases(x), "arthur") > 0 Then
cl.Offset(0, c).Value = Trim(arrPhrases(x))
c = c + 1
ElseIf InStr(arrPhrases(x), "Arthur") > 0 Then
cl.Offset(0, c).Value = Trim(arrPhrases(x))
c = c + 1
End If
Next x
Next cl
End Sub

You might also like