Im trying to write a script that loops through all cells in a column and checks each cell's text if there are two or more post codes in there. If it finds two or more post codes, it needs to highlight the whole row. Cells are filled with adress, like Street of hard-workers 2/12, 77-200, London
. I have something like that below, but it does not include situation in which street's name is written with -
.
Any ideas? :(
sub find_postcode()
For Each cell In Range("D2", Range("D" & Rows.Count).End(xlUp))
If Len(cell) - Len(Replace(cell, "-", "")) > 1 Then
cell.EntireRow.Interior.Color = 65535
End If
Next cell
End sub