Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default COUNTIF across a number of worksheets

Hey

I am trying to count the number of times different initials across 10+
worksheets appear in a specific column.
Basically checking and counting the number of times PGB or RAB or AJC
appears in a specific range (the same range across all the worksheets)

I have managed to do this, however it requires producing some long-winded
formula.

Eg. To count the number of times PGB appears in the range C3-C36 across
several worksheets i have made the formula:

=(COUNTIF('Ward 3'!C3:C36, "PGB")+COUNTIF('Ward 5'!C3:C36,
"PGB")+COUNTIF('Ward 6'!C3:C36,"PGB")+COUNTIF('Ward
7'!C3:C36,"PGB")+COUNTIF('Ward 7'!C39:C72,"PGB")

To make this formula i basically copied and pasted the COUNTIF function
changing the ward number into the formula line.

Is there a better way of doing this?

Second question, I also need to do this for a number of other intials (at
least 20) and I dont really want to keep copying and pasting unless i have
to. Any suggestions?

Thanks

Rup
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default COUNTIF across a number of worksheets


Put all the sheet names to be queried in cell range, C1:Cn (I will assume C3
here) and then use

=SUMPRODUCT(COUNTIF(INDIRECT("'"&C1:C3&"'!C3:C36") ,"PGB"))

Put the initials in a cell say M1:Mn, the formula in N1, and just drag-copy
the formula down.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Rup1776" wrote in message
...
Hey

I am trying to count the number of times different initials across 10+
worksheets appear in a specific column.
Basically checking and counting the number of times PGB or RAB or AJC
appears in a specific range (the same range across all the worksheets)

I have managed to do this, however it requires producing some long-winded
formula.

Eg. To count the number of times PGB appears in the range C3-C36 across
several worksheets i have made the formula:

=(COUNTIF('Ward 3'!C3:C36, "PGB")+COUNTIF('Ward 5'!C3:C36,
"PGB")+COUNTIF('Ward 6'!C3:C36,"PGB")+COUNTIF('Ward
7'!C3:C36,"PGB")+COUNTIF('Ward 7'!C39:C72,"PGB")

To make this formula i basically copied and pasted the COUNTIF function
changing the ward number into the formula line.

Is there a better way of doing this?

Second question, I also need to do this for a number of other intials (at
least 20) and I dont really want to keep copying and pasting unless i have
to. Any suggestions?

Thanks

Rup



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
Max number of worksheets in a file Bob W. New Users to Excel 6 July 7th 06 05:20 PM
CountIF columnH2-H101 the number of time between ages 20-29 occurs viabello Excel Worksheet Functions 2 April 24th 06 10:45 PM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
countif across worksheets MCK Excel Worksheet Functions 7 July 5th 05 05:15 PM
Charting information from a number of worksheets Ian P Charts and Charting in Excel 1 January 14th 05 03:53 PM


All times are GMT +1. The time now is 09:26 AM.

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"