Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / November 2006

Tip: Looking for answers? Try searching our database.

COUNTIF

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
r2d3 - 31 Oct 2006 18:52 GMT
Is there a function that I can use to find the occurence of a certain item
across several worksheets?  Apparently the Countif cannot cross worksheet
boundaries.  I have thought about just using the countif function on each
sheet and them summing them on a cover sheet, but I have 365 sheets to set
up.  Any suggestions would be appreciated.
vezerid - 31 Oct 2006 19:53 GMT
You don;t say much about the ranges to be searched. If we assume it is
the same range in all sheets, e.g. A1:A100, then:

Use an additional range with all the sheet names, say in K1:K10, and
then:

=SUMPRODUCT(COUNTIF(INDIRECT("'"&K1:K10&"'!A1:A100"),0))

HTH
Kostis Vezerides

> Is there a function that I can use to find the occurence of a certain item
> across several worksheets?  Apparently the Countif cannot cross worksheet
> boundaries.  I have thought about just using the countif function on each
> sheet and them summing them on a cover sheet, but I have 365 sheets to set
> up.  Any suggestions would be appreciated.
r2d3 - 07 Nov 2006 18:48 GMT
Do I understand that I will need to write in the names of all 365 worksheets?

> You don;t say much about the ranges to be searched. If we assume it is
> the same range in all sheets, e.g. A1:A100, then:
[quoted text clipped - 12 lines]
> > sheet and them summing them on a cover sheet, but I have 365 sheets to set
> > up.  Any suggestions would be appreciated.
Gord Dibben - 07 Nov 2006 20:14 GMT
Don't type them in.........macro them in.

Private Sub ListSheets()
'list of sheet names starting at A1
 Dim rng As Range
 Dim i As Integer
     Set rng = Range("A1")
        For Each Sheet In ActiveWorkbook.Sheets
     rng.Offset(i, 0).Value = Sheet.Name
     i = i + 1
 Next Sheet
End Sub

Insert a new sheet and run the macro to get a list of 365 sheets in A1:A365

Alter vezer's formula to suit.

BTW........365 sheets is getting up there.  You should look at a
re-organization.

Gord Dibben  MS Excel MVP

>Do I understand that I will need to write in the names of all 365 worksheets?
>
[quoted text clipped - 14 lines]
>> > sheet and them summing them on a cover sheet, but I have 365 sheets to set
>> > up.  Any suggestions would be appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.