Need help with array formula to count rows w/ mult.criteria
Hi Ed
1. quite simple. Instead of ...*(DATE_COL=DATE(2003,1,1))*... write
....*(DATE_COL=DATE(2003,1,1))*(DATE_COL<=DATE(20 03,3,1))*...
2. You can easily create a name for a column like $A$1:$A$20000 just
the simple selections without row numbers is not allowed
Frank
Ed wrote:
Thanks for the reply, Frank. I don't understand quite everything
you've given me, but I'll work through it. A few questions, if I
may:
(1) I simplified things for the question, but I may have been too
simple with regards to the date. Rarely will it be that clean - it
will be more like =2003104 AND <=20040323. I can't how to fit
"between this date and that date" into the formula you provided.
(2) If I read you right, I can't just select an entire column and
name it; I have to just select the used range and name that only?
Thanks for the help.
Ed
"Frank Kabel" wrote in message
...
Hi Ed
try
SUMPRODUCT((NOT(ISERROR(FIND("L5-B",ITEM))))*(DATE_COL=DATE(2003,1,1))
*(COLOR="BLUE")*(STYLE="MODERN"))
Some notes:
your ranges have to be defined like $A$1:$A$9999 ($A:$A won't work
for SUMPRODUCT). And all should consist of the same number of rows
Also I'm not sure if the name DATE is accepted by Excel as it is the
same as the Excel function - I changed it in the above example to
DATE_COL
HTH
Frank
Ed wrote:
I need to count the number of rows containing certain items. I
think an array formula might be what I need. I've never done this
before, and I'm running into some difficulties.
I've got four columns as named ranges: ITEM, DATE, COLOR, and
STYLE.
ITEM is a text filed as "L5-(some letter)(several numbers). DATE
is
formatted as 20030101. COLOR and STYLE are text. I want to chose
an item as "L5-B*", with dates between (for example) 20030101 and
20030201. Then I need to say "for each COLOR, how many do I have
of
each STYLE"?
I Ctrl+Shift+entered the following formula (it showed up with
brackets), but got a "#N/A" error. Any help is greatly
appreciated.
=SUM((ITEM="L5-B*")*(DATE=20030101)*(DATE<=20030201)*(COLOR="BLU E")*(S
TYLE=
"MODERN"))
Ed
|