Thread: Countif
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Countif

Your original formula (a bit easier to read):

=COUNTIF('DATA (RAW)'!BH:BH,""&DASHBOARD!AD3)
-COUNTIF('DATA (RAW)'!N:N,"SUPPORT REQUEST")
-COUNTIF('DATA (RAW)'!N:N,"WORK ORDER")
-COUNTIF('DATA (RAW)'!AQ:AQ,"EMEA")
-COUNTIF('DATA (RAW)'!AQ:AQ,"CALA")
-COUNTIF('DATA (RAW)'!AR:AR,"CA")
-COUNTIF('DATA (RAW)'!AR:AR,"US")

Maybe you could use this kind of thing (_I think_):

=SUMPRODUCT(--('Data (Raw)'!BH1:BH11DashBoard!AD3),
--('Data (Raw)'!N1:N11<"SUPPORT REQUEST")
--('Data (Raw)'!N1:N11<"WORK ORDER"),
--('Data (Raw)'!AQ1:AQ11<"EMEA"),
--('Data (Raw)'!AQ1:AQ11<"CALA"),
--('Data (Raw)'!AR1:AR11<"CA"),
--('Data (Raw)'!AR1:AR11<"US"))

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

=========

This formula wants the cells in each row of BH1:BH11 to be bigger than the date
in Dashboard!AD3

And at the same time N1:n11 different from "support request"
and at the same time N1:n11 different from "work order"

and at the same time aq1:aq11 different from "emea"
and ....



Ken wrote:

I have two questions.

1st- Can someone tell me another way to write this statement? This is not
working for me and I don't understand why. This dashboard portion refers to
today's date [""&DASHBOARD!AD3] and it works fine. The problem is I need to
remove or exclude some of the other data so I can filter per Region and only
show "ICMS Request" values.

=COUNTIF('DATA (RAW)'!BH:BH,""&DASHBOARD!AD3)-COUNTIF('DATA
(RAW)'!N:N,"SUPPORT REQUEST")-COUNTIF('DATA (RAW)'!N:N,"WORK
ORDER")-COUNTIF('DATA (RAW)'!AQ:AQ,"EMEA")-COUNTIF('DATA
(RAW)'!AQ:AQ,"CALA")-COUNTIF('DATA (RAW)'!AR:AR,"CA")-COUNTIF('DATA
(RAW)'!AR:AR,"US")

2nd - Is there a way to count only the values that = today's date? The
following doesn't work:

=COUNTIF('DATA (RAW)'!BH:BH,"="&DASHBOARD!AD3)

Appreciate the help ... this report is killing me!


--

Dave Peterson