Datatellsall2
New Member
- Joined
- Jul 17, 2018
- Messages
- 23
Hi There,
I have the following macro to highlight cells which include 2 consecutive words that start with a capitalized letter. I would like for this macro to cover my entire workbook and not a specific range. Do I only need to change what is in red? Or is there more to it?
Sub HighlightCellsWithTwoOrMoreUpperCaseLetters()
Dim Cell As Range, DataRange As Range
Set DataRange = Range("A1:A100")
DataRange.ClearFormats
For Each Cell In DataRange
If Cell Like "*[A-Z]*[A-Z]*" Then Cell.Interior.Color = vbYellow
Next
End Sub
Thanks so much,
M
I have the following macro to highlight cells which include 2 consecutive words that start with a capitalized letter. I would like for this macro to cover my entire workbook and not a specific range. Do I only need to change what is in red? Or is there more to it?
Sub HighlightCellsWithTwoOrMoreUpperCaseLetters()
Dim Cell As Range, DataRange As Range
Set DataRange = Range("A1:A100")
DataRange.ClearFormats
For Each Cell In DataRange
If Cell Like "*[A-Z]*[A-Z]*" Then Cell.Interior.Color = vbYellow
Next
End Sub
Thanks so much,
M