Hiii,
I found a way to overcome it.But it colours all other blank cells too
. can we JUST color those cells NOT STARTING with PT50 ? any expert advice on this ?? Thaaaaanks in advance
Please find the code below i modified from yours.
Code:
Option Explicit
Sub IbanNo()
Dim LR As Long
Dim iX As Long
Dim rRng As Range
LR = ActiveSheet.UsedRange.Rows.Count
For iX = 4 To LR
If Left(Cells(iX, 16), 4) <> "PT50" Then
If rRng Is Nothing Then
Set rRng = Cells(iX, 16)
Else: Set rRng = Union(rRng, Cells(iX, 16))
End If
End If
Next iX
With rRng
.Interior.ColorIndex = 3
End With
End Sub
Bookmarks