#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DD DD is offline
external usenet poster
 
Posts: 68
Default CoutIF Question

I'm trying to count across 10 different worksheets. I've tried using the
formulas posted but I can't seem to get them to work. This is the formula
that I'm trying to use:

=COUNTIF(Appelopen:Sarahopen!H12,"x") and it keeps giving me a value
error.

If there are any x's, they are all in the same cell on each worksheet.
Meaning some may cells may not have an "x", they may be blank, but I just
want to know how many total x's not cells.

I hope this makes sense and thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default CoutIF Question

COUNTIF doesn't directly work across many sheets. You can "trick" it into
doing so but it requires listing your sheet names.

The easiest way to do this would be to use a cell on each sheet with a
formula like this:

=--(H12="x")

This will return either a 1 or a 0. Then you can just do a sum formula like
this:

Assuming the cell on each sheet is AA1...

=SUM(Appelopen:Sarahopen!AA1)

--
Biff
Microsoft Excel MVP


"dd" wrote in message
...
I'm trying to count across 10 different worksheets. I've tried using the
formulas posted but I can't seem to get them to work. This is the formula
that I'm trying to use:

=COUNTIF(Appelopen:Sarahopen!H12,"x") and it keeps giving me a value
error.

If there are any x's, they are all in the same cell on each worksheet.
Meaning some may cells may not have an "x", they may be blank, but I just
want to know how many total x's not cells.

I hope this makes sense and thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default CoutIF Question

I was attempting the same thing recently and found this on the internet.
Personally I don't understand why it works but it did for me. Maybe one of
the MVP's can explain it. On the worksheet where you want your count to
display enter the names of your worksheets in cells H1 thru H7 (for my
example) and enter the formula below.

=SUMPRODUCT(COUNTIF(INDIRECT("'"&H1:H7&"'!H12"),"x "))

Hope this helps,


"dd" wrote:

I'm trying to count across 10 different worksheets. I've tried using the
formulas posted but I can't seem to get them to work. This is the formula
that I'm trying to use:

=COUNTIF(Appelopen:Sarahopen!H12,"x") and it keeps giving me a value
error.

If there are any x's, they are all in the same cell on each worksheet.
Meaning some may cells may not have an "x", they may be blank, but I just
want to know how many total x's not cells.

I hope this makes sense and thanks in advance.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default CoutIF Question

=SUMPRODUCT(COUNTIF(INDIRECT("'"&H1:H7&"'!H12")," x"))

The formula is essentially performing an array of COUNTIF's.

Let's assume the sheet names are Sheet1, Sheet2, Sheet3, Sheet4 etc.

=SUMPRODUCT(
COUNTIF(Sheet1!H12,"x");
COUNTIF(Sheet2!H12,"x");
COUNTIF(Sheet3!H12,"x");
COUNTIF(Sheet4!H12,"x")
)

That's not exactly how it does it but that should give you the basic idea of
what's happening.

The drawback is that you have to list the sheet names.

--
Biff
Microsoft Excel MVP


"Gary Mc" wrote in message
...
I was attempting the same thing recently and found this on the internet.
Personally I don't understand why it works but it did for me. Maybe one
of
the MVP's can explain it. On the worksheet where you want your count to
display enter the names of your worksheets in cells H1 thru H7 (for my
example) and enter the formula below.

=SUMPRODUCT(COUNTIF(INDIRECT("'"&H1:H7&"'!H12"),"x "))

Hope this helps,


"dd" wrote:

I'm trying to count across 10 different worksheets. I've tried using the
formulas posted but I can't seem to get them to work. This is the formula
that I'm trying to use:

=COUNTIF(Appelopen:Sarahopen!H12,"x") and it keeps giving me a value
error.

If there are any x's, they are all in the same cell on each worksheet.
Meaning some may cells may not have an "x", they may be blank, but I just
want to know how many total x's not cells.

I hope this makes sense and thanks in advance.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default CoutIF Question

Biff,
Thanks for the explanation - much appreciated!
GMc

"T. Valko" wrote:

=SUMPRODUCT(COUNTIF(INDIRECT("'"&H1:H7&"'!H12")," x"))


The formula is essentially performing an array of COUNTIF's.

Let's assume the sheet names are Sheet1, Sheet2, Sheet3, Sheet4 etc.

=SUMPRODUCT(
COUNTIF(Sheet1!H12,"x");
COUNTIF(Sheet2!H12,"x");
COUNTIF(Sheet3!H12,"x");
COUNTIF(Sheet4!H12,"x")
)

That's not exactly how it does it but that should give you the basic idea of
what's happening.

The drawback is that you have to list the sheet names.

--
Biff
Microsoft Excel MVP


"Gary Mc" wrote in message
...
I was attempting the same thing recently and found this on the internet.
Personally I don't understand why it works but it did for me. Maybe one
of
the MVP's can explain it. On the worksheet where you want your count to
display enter the names of your worksheets in cells H1 thru H7 (for my
example) and enter the formula below.

=SUMPRODUCT(COUNTIF(INDIRECT("'"&H1:H7&"'!H12"),"x "))

Hope this helps,


"dd" wrote:

I'm trying to count across 10 different worksheets. I've tried using the
formulas posted but I can't seem to get them to work. This is the formula
that I'm trying to use:

=COUNTIF(Appelopen:Sarahopen!H12,"x") and it keeps giving me a value
error.

If there are any x's, they are all in the same cell on each worksheet.
Meaning some may cells may not have an "x", they may be blank, but I just
want to know how many total x's not cells.

I hope this makes sense and thanks in advance.






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default CoutIF Question

You're welcome!

--
Biff
Microsoft Excel MVP


"Gary Mc" wrote in message
...
Biff,
Thanks for the explanation - much appreciated!
GMc

"T. Valko" wrote:

=SUMPRODUCT(COUNTIF(INDIRECT("'"&H1:H7&"'!H12")," x"))


The formula is essentially performing an array of COUNTIF's.

Let's assume the sheet names are Sheet1, Sheet2, Sheet3, Sheet4 etc.

=SUMPRODUCT(
COUNTIF(Sheet1!H12,"x");
COUNTIF(Sheet2!H12,"x");
COUNTIF(Sheet3!H12,"x");
COUNTIF(Sheet4!H12,"x")
)

That's not exactly how it does it but that should give you the basic idea
of
what's happening.

The drawback is that you have to list the sheet names.

--
Biff
Microsoft Excel MVP


"Gary Mc" wrote in message
...
I was attempting the same thing recently and found this on the internet.
Personally I don't understand why it works but it did for me. Maybe
one
of
the MVP's can explain it. On the worksheet where you want your count
to
display enter the names of your worksheets in cells H1 thru H7 (for my
example) and enter the formula below.

=SUMPRODUCT(COUNTIF(INDIRECT("'"&H1:H7&"'!H12"),"x "))

Hope this helps,


"dd" wrote:

I'm trying to count across 10 different worksheets. I've tried using
the
formulas posted but I can't seem to get them to work. This is the
formula
that I'm trying to use:

=COUNTIF(Appelopen:Sarahopen!H12,"x") and it keeps giving me a
value
error.

If there are any x's, they are all in the same cell on each worksheet.
Meaning some may cells may not have an "x", they may be blank, but I
just
want to know how many total x's not cells.

I hope this makes sense and thanks in advance.






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
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
coutif problem hsb101 New Users to Excel 3 August 3rd 06 08:08 AM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM
coutif with 3 criteria including brackets Ray Excel Worksheet Functions 6 August 23rd 05 07:24 PM


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