View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ExcelMonkey[_177_] ExcelMonkey[_177_] is offline
external usenet poster
 
Posts: 1
Default Counting Cells that meet criteria across entire workbook


I am looking to write a macro that checks each cell in each sheet in
workbook and counts the occurences of formulas. I am not sure how t
approach this. The code below prints all the sheets in a workbook.
It dimensions "s" as a Worksheet. Is it possible to use the sam
thinking for what I want to do? That is, can you dimension a variabl
as a cell (or range), check to see that it meets a condition, and kee
adding this to a cumulative total that summarizes the result in
message box?

Sub PrintAll()
Dim s As Worksheet
For Each s In Worksheets()
s.Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Next s

End Sub

Thank

--
ExcelMonke
-----------------------------------------------------------------------
ExcelMonkey's Profile: http://www.excelforum.com/member.php...nfo&userid=522
View this thread: http://www.excelforum.com/showthread.php?threadid=26821