Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default COUNTIF accross multiple worksheets issues

I've seen quite a few posts on this problem but haven't been able to
use any of the solutions I've found.

The problem:

(Excel 2003)

=COUNTIF (W1!A1:A5,"1") is fine (W1 = Worksheet Name)

=COUNTIF (W1.W5!A1:A5,"1") broken

(tried with and without quotes around worksheet names)

I want to solve this without using any addons, without resorting to
VBA, and it would be nice (but not possible?) to solve without an
INDIRECT and creating lists/ranges of work sheet names. In other
words, I would like a simple and elegant solution.

As an aside rant, why doesn't this work? COUNTA and other functions
seem to have no problem with worksheet ranges.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default COUNTIF accross multiple worksheets issues

If you have only 5 sheets then use this

=COUNTIF (W1!A1:A5,"1") +COUNTIF (W2!A1:A5,"1")+COUNTIF
(W3!A1:A5,"1")+COUNTIF (W4!A1:A5,"1")+COUNTIF (W5!A1:A5,"1")

" wrote:

I've seen quite a few posts on this problem but haven't been able to
use any of the solutions I've found.

The problem:

(Excel 2003)

=COUNTIF (W1!A1:A5,"1") is fine (W1 = Worksheet Name)

=COUNTIF (W1.W5!A1:A5,"1") broken

(tried with and without quotes around worksheet names)

I want to solve this without using any addons, without resorting to
VBA, and it would be nice (but not possible?) to solve without an
INDIRECT and creating lists/ranges of work sheet names. In other
words, I would like a simple and elegant solution.

As an aside rant, why doesn't this work? COUNTA and other functions
seem to have no problem with worksheet ranges.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default COUNTIF accross multiple worksheets issues

On Nov 14, 9:59*am, Joel wrote:
If you have only 5 sheets then use this

=COUNTIF (W1!A1:A5,"1") +COUNTIF (W2!A1:A5,"1")+COUNTIF
(W3!A1:A5,"1")+COUNTIF (W4!A1:A5,"1")+COUNTIF (W5!A1:A5,"1")


Thanks; that seems like it would work fine.

But I finally 'bit it' and used the INDIRECT funtion. I don't like it
because I have to edit a LOT of fields when I add a new worksheet.

Why can't they just fix COUNTIF?
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default COUNTIF accross multiple worksheets issues

I don't know why they can't fix the problem. It probably effects a lot of
functions. My guess by changing the code it will break other peoples
workbooks that are relying on bugs so they will work.

The main problem is the microsoft code wasn't tested very well in the 1st
place. New enhancements were rushed to market to beat the competion. Lotus
was good, Quatro was GREAAAAAAAAAT, and Excel was PooooooooooooooooR. but
eventually Excel won the rat race.

" wrote:

On Nov 14, 9:59 am, Joel wrote:
If you have only 5 sheets then use this

=COUNTIF (W1!A1:A5,"1") +COUNTIF (W2!A1:A5,"1")+COUNTIF
(W3!A1:A5,"1")+COUNTIF (W4!A1:A5,"1")+COUNTIF (W5!A1:A5,"1")


Thanks; that seems like it would work fine.

But I finally 'bit it' and used the INDIRECT funtion. I don't like it
because I have to edit a LOT of fields when I add a new worksheet.

Why can't they just fix COUNTIF?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default COUNTIF accross multiple worksheets issues

On Nov 14, 11:05*am, Joel wrote:
I don't know why they can't fix the problem. *It probably effects a lot of
functions. *My guess by changing the code it will break other peoples
workbooks that are relying on bugs so they will work.

The main problem is the microsoft code wasn't tested very well in the 1st
place. *New enhancements were rushed to market to beat the competion. *Lotus
was good, Quatro was GREAAAAAAAAAT, and Excel was PooooooooooooooooR. *but
eventually Excel won the rat race.



" wrote:
On Nov 14, 9:59 am, Joel wrote:
If you have only 5 sheets then use this


=COUNTIF (W1!A1:A5,"1") +COUNTIF (W2!A1:A5,"1")+COUNTIF
(W3!A1:A5,"1")+COUNTIF (W4!A1:A5,"1")+COUNTIF (W5!A1:A5,"1")


Thanks; that seems like it would work fine.


But I finally 'bit it' and used the INDIRECT funtion. *I don't like it
because I have to edit a LOT of fields when I add a new worksheet.


Why can't they just fix COUNTIF?- Hide quoted text -


I just realized that my list of Worksheet names in my INDIRECT
function is in quotes, thus the field ranges aren't adjusted when I
'copy' the function. That's about 3 seperate edits in 90 cells I have
to do hand. :(





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
VLookup accross multiple worksheets jedman Excel Worksheet Functions 8 November 11th 08 06:37 PM
SumIf accross multiple worksheets Karen53 Excel Worksheet Functions 6 August 23rd 07 08:01 AM
COUNTIF Accross Multiple Columns with AND [email protected] Excel Discussion (Misc queries) 6 October 2nd 06 04:11 PM
Vlookup accross multiple worksheets Excelcrazy Excel Worksheet Functions 3 December 20th 05 11:32 PM
Countif accross multiple questions. golden Excel Discussion (Misc queries) 1 October 28th 05 05:59 PM


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

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

About Us

"It's about Microsoft Excel"