Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referencing all sheets in a workbook in VBA
Private Sub Counting_Test()
Dim count As Single count = 0 For Each c In Workbooks("June.xls").Worksheets("11").Range("H1:H 275") If c.Value = Date Then count = count + 1 Next MsgBox count End Sub Ok, when this macro is run, it'll give me a message box telling me ho many cells in workbook "June" bewteen H1 and H275 on worksheet "11 have today's date in the in them. This works just fine, however, I nee to get a way so that every cell between H1 and H275 on every workshee in the workbook is counted, not just one worksheet....Can you all hel me? PS. the "Sheets(Array" term can't be used because that always refers t specific sheets. This workbook is updated daily, so I can't refer t specific sheets. Thanks in advanc -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Referencing sheets | Excel Discussion (Misc queries) | |||
Formulas referencing different sheets in workbook | Excel Discussion (Misc queries) | |||
When referencing other Sheets | Excel Discussion (Misc queries) | |||
Referencing Different Sheets in VBA | Excel Discussion (Misc queries) | |||
Referencing Sheets | Excel Programming |