As I am trying to automate it .
I got something here from google and it is formatting for entire row with the given condition. I need to format only the filled cells. Could you please edit the below macro and see that it will format only the cells which are filled.
Sub test3()
Dim i As Long, j As Long, rw As Long, bDel As Long
Dim rng As Range, cel As Range
Dim arrWords
Dim xlCalc As XlCalculation
arrWords = Array("Total") ' edit the array as required
xlCalc = Application.Calculation
Set rng = Range("B1:B200")
For rw = rng.Rows(rng.Rows.Count).Row To rng.Rows(1).Row Step -1
For j = 0 To UBound(arrWords)
If InStr(1, rng(rw, 1), arrWords(j), vbTextCompare) Then
bDel = True
rng.Parent.Rows(rw).EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorLight2
.TintAndShade = 0.799981688894314
.PatternTintAndShade = 0
End With
Selection.Font.Bold = True
Exit For
End If
Next
Next
Application.Calculation = xlCalc
End Sub
Bookmarks