looping thru each w/sheet

  • Thread starter Thread starter mb97
  • Start date Start date
M

mb97

Hi,

I'm looking to loop through each ws in the current workbook and, for
each w/sheet, programatically get the highest value in one of the
columns, count the number of occurrences of a cartain variable in
another column and return these values programatically so I can create
a Front Page type of thing.

I think I understand how to get the list of worksheets i'ts after that
I get stuck...I've no idea how to reference cells in a worksheet from
within vba.

also....

is it possible to run the code I create ONLY when a certain cell value
is changed on the Front PAge???

TIA
 
For Each sh In Activeworkbook.Worksheets
myVar = sh.Range("A1")
myCount = Application.COUNTIF(Columns(3),"abc")
'do something with these values
Next sh

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Thanks Dave.

Bob

(remove nothere from email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top