Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 440
Default Countif looking at many sheets

How can I adapt the following to also look in the same range in sheet1!,
sheet2! and sheet3! as well as sheet 4! ?
=COUNTIF(sheet4!Z$4:Z$4000,"b")
--
Traa Dy Liooar

Jock
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Countif looking at many sheets

=SUM(COUNTIF(INDIRECT("Sheet"&{1,2,3,4}&"!Z$4:Z$40 00"),"b"))

"Jock" wrote:

How can I adapt the following to also look in the same range in sheet1!,
sheet2! and sheet3! as well as sheet 4! ?
=COUNTIF(sheet4!Z$4:Z$4000,"b")
--
Traa Dy Liooar

Jock

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Countif looking at many sheets

Remove the $ sign in the data range

=SUM(COUNTIF(INDIRECT("Sheet"&{1,2,3,4}&"!Z4:Z4000 "),"b"))


"Teethless mama" wrote:

=SUM(COUNTIF(INDIRECT("Sheet"&{1,2,3,4}&"!Z$4:Z$40 00"),"b"))

"Jock" wrote:

How can I adapt the following to also look in the same range in sheet1!,
sheet2! and sheet3! as well as sheet 4! ?
=COUNTIF(sheet4!Z$4:Z$4000,"b")
--
Traa Dy Liooar

Jock

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 440
Default Countif looking at many sheets

All I get is #REF!
All sheets have names - would that make it easier?
--
Traa Dy Liooar

Jock


"Teethless mama" wrote:

Remove the $ sign in the data range

=SUM(COUNTIF(INDIRECT("Sheet"&{1,2,3,4}&"!Z4:Z4000 "),"b"))


"Teethless mama" wrote:

=SUM(COUNTIF(INDIRECT("Sheet"&{1,2,3,4}&"!Z$4:Z$40 00"),"b"))

"Jock" wrote:

How can I adapt the following to also look in the same range in sheet1!,
sheet2! and sheet3! as well as sheet 4! ?
=COUNTIF(sheet4!Z$4:Z$4000,"b")
--
Traa Dy Liooar

Jock

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Countif looking at many sheets

put all your sheet names in the cell:
A1: test 1
A2: test 2
A3: test 3
A4: test 4

"Mysheets" is defined name range A1:A4 (no quotes)

=SUMPRODUCT(COUNTIF(INDIRECT("'"&MySheets&"'!Z4:Z4 000"),"b"))


"Jock" wrote:

All I get is #REF!
All sheets have names - would that make it easier?
--
Traa Dy Liooar

Jock


"Teethless mama" wrote:

Remove the $ sign in the data range

=SUM(COUNTIF(INDIRECT("Sheet"&{1,2,3,4}&"!Z4:Z4000 "),"b"))


"Teethless mama" wrote:

=SUM(COUNTIF(INDIRECT("Sheet"&{1,2,3,4}&"!Z$4:Z$40 00"),"b"))

"Jock" wrote:

How can I adapt the following to also look in the same range in sheet1!,
sheet2! and sheet3! as well as sheet 4! ?
=COUNTIF(sheet4!Z$4:Z$4000,"b")
--
Traa Dy Liooar

Jock



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 440
Default Countif looking at many sheets

That's it, thank you.
--
Traa Dy Liooar

Jock


"Teethless mama" wrote:

put all your sheet names in the cell:
A1: test 1
A2: test 2
A3: test 3
A4: test 4

"Mysheets" is defined name range A1:A4 (no quotes)

=SUMPRODUCT(COUNTIF(INDIRECT("'"&MySheets&"'!Z4:Z4 000"),"b"))


"Jock" wrote:

All I get is #REF!
All sheets have names - would that make it easier?
--
Traa Dy Liooar

Jock


"Teethless mama" wrote:

Remove the $ sign in the data range

=SUM(COUNTIF(INDIRECT("Sheet"&{1,2,3,4}&"!Z4:Z4000 "),"b"))


"Teethless mama" wrote:

=SUM(COUNTIF(INDIRECT("Sheet"&{1,2,3,4}&"!Z$4:Z$40 00"),"b"))

"Jock" wrote:

How can I adapt the following to also look in the same range in sheet1!,
sheet2! and sheet3! as well as sheet 4! ?
=COUNTIF(sheet4!Z$4:Z$4000,"b")
--
Traa Dy Liooar

Jock

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Countif looking at many sheets

You're Welcome!


"Jock" wrote:

That's it, thank you.
--
Traa Dy Liooar

Jock


"Teethless mama" wrote:

put all your sheet names in the cell:
A1: test 1
A2: test 2
A3: test 3
A4: test 4

"Mysheets" is defined name range A1:A4 (no quotes)

=SUMPRODUCT(COUNTIF(INDIRECT("'"&MySheets&"'!Z4:Z4 000"),"b"))


"Jock" wrote:

All I get is #REF!
All sheets have names - would that make it easier?
--
Traa Dy Liooar

Jock


"Teethless mama" wrote:

Remove the $ sign in the data range

=SUM(COUNTIF(INDIRECT("Sheet"&{1,2,3,4}&"!Z4:Z4000 "),"b"))


"Teethless mama" wrote:

=SUM(COUNTIF(INDIRECT("Sheet"&{1,2,3,4}&"!Z$4:Z$40 00"),"b"))

"Jock" wrote:

How can I adapt the following to also look in the same range in sheet1!,
sheet2! and sheet3! as well as sheet 4! ?
=COUNTIF(sheet4!Z$4:Z$4000,"b")
--
Traa Dy Liooar

Jock

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Countif looking at many sheets

look in the same range in sheet1!, sheet2!
and sheet3! as well as sheet 4!


If you only have a "few" sheets...

=COUNTIF(Sheet1!Z$4:Z$4000,"b")+COUNTIF(Sheet2!Z$4 :Z$4000,"b")+COUNTIF(Sheet3!Z$4:Z$4000,"b")+COUNTI F(Sheet4!Z$4:Z$4000,"b")

--
Biff
Microsoft Excel MVP


"Jock" wrote in message
...
How can I adapt the following to also look in the same range in sheet1!,
sheet2! and sheet3! as well as sheet 4! ?
=COUNTIF(sheet4!Z$4:Z$4000,"b")
--
Traa Dy Liooar

Jock



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
Using COUNTIF across different sheets JStiehl Excel Discussion (Misc queries) 1 May 14th 08 02:17 PM
COUNTIF across multiple sheets Gizmo63 Excel Worksheet Functions 3 April 10th 06 11:42 AM
COUNTIF across sheets MaggieMagill Excel Worksheet Functions 2 October 7th 05 08:18 AM
COUNTIF across all sheets of a workbook Steve Excel Worksheet Functions 6 June 1st 05 04:44 AM
COUNTIF across all sheets of a workbook Steve Excel Worksheet Functions 0 May 31st 05 11:56 PM


All times are GMT +1. The time now is 06:08 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"