Thread: countif
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Amanda Amanda is offline
external usenet poster
 
Posts: 151
Default countif

That might work, But I am trying to count different ranges for each month. IE
sometimes I need to count from 1/5/05 - 1/5/06 and other times I need to
count from 27/4/05 - 27/4/06. But they overlap into other years which are on
different sheets. I have tried entering the first formula that you gave me,
but using it through different sheets and it dosen't seem to work. Is it
possible to use that formula in the way I am trying.

"Roger Govier" wrote:

Hi Amanda

Even though each month has differing numbers of days, presumably AE4:AG4
will be blank in February, so it wouldn't matter.

Why not just put a formula in AH4 on each sheet - you can do then all at
once by selecting the Jan hold down Shift and select Dec, and this will
group the sheets
In cell AH4 enter
=COUNTIF(C4:AG4,"x")
Click on any sheet to Ungroup then again

For your summary
=SUM(Jan:Dec!AH4)
This assumes that the sheets are in chronological order.

Other wise create 2 new sheets called First and Last and position them
so that they "sandwich" your Monthly sheets, but keep your Summary sheet
outside of the sandwich.
=SUM(First:Last!AH4)
will not worry about the order inside First and Last, and you can drag
sheets in and out of the range to add differing numbers of months if
required.


--
Regards

Roger Govier


"Amanda" wrote in message
...
Thanks, I will try that. I do have to do it for the 12 months but each
range
is different which is a bumma (as each month has a different amount of
days
in it). Any other ideas would be greatly appreciated.

"T. Valko" wrote:

Try it this way:

=COUNTIF('Jan 05'!C4:AG4,"x")+COUNTIF('Feb 05'!C4:AD4,"x")+
COUNTIF('Mar 05'!C4:AG4,"x")+COUNTIF('Apr 05'!C4:AF4, "x")

If you had to do it for all 12 months this would result in a pretty
long
formula. There's a shorter alternative but it requires that all the
ranges
are the same.

Biff

"Amanda" wrote in message
...
I am trying to count the number of "x" in a row in multiple
worksheets.
This
is the formula I have been trying to use
=COUNTIF('Jan 05'!C4:AG4+'Feb 05'!C4:AD4+'Mar 05'!C4:AG4+'Apr
05'!C4:AF4,
"x")

Why isn't it working. Please help.

Thanks
Amanda