Thread
:
Run macro on all worksheets within workbook
View Single Post
#
5
Posted to microsoft.public.excel.programming
Marek Socha
external usenet poster
Posts: 2
Run macro on all worksheets within workbook
(Marek Socha) wrote in message . com...
I have a simple macro that highlights entire row based on specific
value within specified range.
Sub RowHighlight()
Dim DataRng As Range
Dim LastRow As Long
Dim cell As Range
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Set DataRng = Range("A3:A7")
For Each cell In DataRng
If cell.Value = " Date" Then
cell.EntireRow.Interior.ColorIndex = 3
End If
Next cell
End Sub
My workbook has more than a 100 worksheets...it would be a pain to tab
through all of them and run this macro.
How do I make it run through all worksheets?
Any help would be greatly appreciated.
Thanks,
Mark
Thanks guys...works exactly the way I wanted it to...this group is just fantastic
Mark
Reply With Quote
Marek Socha
View Public Profile
Find all posts by Marek Socha