#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default COUNTIF

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.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default COUNTIF

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



r2d3 wrote:
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.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default COUNTIF

Do I understand that I will need to write in the names of all 365 worksheets?

"vezerid" wrote:

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



r2d3 wrote:
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.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default COUNTIF

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

On Tue, 7 Nov 2006 10:48:02 -0800, r2d3 wrote:

Do I understand that I will need to write in the names of all 365 worksheets?

"vezerid" wrote:

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



r2d3 wrote:
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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sumproduct vs. countif Coal Miner Excel Discussion (Misc queries) 1 June 15th 06 09:34 PM
Countif Formula /Sort Bug??? orcfodder Excel Discussion (Misc queries) 2 January 12th 06 10:04 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
Combining IF and COUNTIF based on two columns maxtrixx Excel Discussion (Misc queries) 5 March 31st 05 06:21 PM
Countif - Countif maswinney Excel Worksheet Functions 3 November 15th 04 11:06 PM


All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"