straw
11-01-2011, 06:51 AM
Dear all,
I am a newbie in VBA and encounter a problem. Please help me.
My excel sheet has several columns and hundred rows. Each column represents different items (eg.: Invoice number, transaction date, completion etc). Now I would like to create a VBA which will search the "Completion" column (Column C) for the word of "Completed". When it is "completed", then that row (from Column A to Column I) will be filled with color in order to easily search uncompleted transaction.
Since I am too superficial, what I can do is just highlight the "completed" cell only :<
Belows are what I wrote
Sub Highlight()
Dim clnC As Range
Dim clcell As Range
Set clnC = Range("C9:C10000")
For Each clcell In clnC
If clcell.Value = "Completed" Then
clcell.Select
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
End If
Next clcell
End Sub
Thanks in advance for your help.
I am a newbie in VBA and encounter a problem. Please help me.
My excel sheet has several columns and hundred rows. Each column represents different items (eg.: Invoice number, transaction date, completion etc). Now I would like to create a VBA which will search the "Completion" column (Column C) for the word of "Completed". When it is "completed", then that row (from Column A to Column I) will be filled with color in order to easily search uncompleted transaction.
Since I am too superficial, what I can do is just highlight the "completed" cell only :<
Belows are what I wrote
Sub Highlight()
Dim clnC As Range
Dim clcell As Range
Set clnC = Range("C9:C10000")
For Each clcell In clnC
If clcell.Value = "Completed" Then
clcell.Select
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
End If
Next clcell
End Sub
Thanks in advance for your help.