sted the info, to the right, all the way out until AA Sub Regex2()
Dim oMatches As Object, oMatch As Object, i As Long, vOut, rng As Range
With CreateObject("vbscript.regexp")
.Global = True
.Pattern = "[A-Za-z]{4}[0-9]{4}"
For Each rng In Range("A1", Range("Z199").End(xlDown))
If .Test(rng) Then
Set oMatches = .Execute(rng)
ReDim vOut(0 To oMatches.Count - 1)
For i = 0 To oMatches.Count - 1
vOut(i) = oMatches(i).Value
Next i
rng.Offset(, 1).Resize(i) = WorksheetFunction.Transpose(vOut)
End If
Next rng
End With
End Sub
I'm doing something wrong, and I think it's the A1 info I added. I took your "Ammend A1" to mean the first A1 was the first Cell you wanted the script to search, and the second A1 was the last, so I edited that statement as pictured above. How should they be properly edited?
I think that's the issue with it going into so many cells.
I was hoping to have this, if possible, take the data and designate where it puts it when I run it. Maybe like G1, G2, G3 etc
Bookmarks