Eloise T
Active Member
Below is a line of VBA that looks for "** Received check **" or "Received cash **"
I need to modify it so that if there's anything beyond the 4th asterisk, the "OR" will find the expression True.
In other words, as long as the data begins with either "** Received check **" or "Received cash **" then let the expression be True.
Thank you for looking.
.FormatConditions.Add Type:=xlExpression, Formula1:="=OR($D3=""** Received check **"",$D3=""** Received cash **"")"
The whole deal is:
I need to modify it so that if there's anything beyond the 4th asterisk, the "OR" will find the expression True.
In other words, as long as the data begins with either "** Received check **" or "Received cash **" then let the expression be True.
Thank you for looking.
.FormatConditions.Add Type:=xlExpression, Formula1:="=OR($D3=""** Received check **"",$D3=""** Received cash **"")"
The whole deal is:
Code:
'Column D ------------------------------------------------------------------------------------------
'** Received check ** / ** Received cash **
With Ws.Range("D3:D8503")
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="=OR($D3=""** Received check **"",$D3=""** Received cash **"")"
.FormatConditions(.FormatConditions.Count).Font.Bold = False 'Bold font
.FormatConditions(.FormatConditions.Count).Font.ColorIndex = 1 'Black font
.FormatConditions(.FormatConditions.Count).Interior.ColorIndex = 2 'White background
.FormatConditions(.FormatConditions.Count).StopIfTrue = False
End With
[\CODE]
Last edited: