View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Count a cell in month format

Hi,

The non-dates in the date range give a problem with a standard sumproduct so
try this

=SUMPRODUCT((ISNUMBER(FIND("Mar",TEXT(C1:C21,"mmm" ))))*(D1:D21="Reg"))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Mike Wheeler" wrote:

Cell data:
15-Feb REG
22-Feb REG
8-Mar REG
15-Mar REG
15-Mar REG
29-Mar APIN
29-Mar REG
29-Mar REG
29-Mar REG
29-Mar APIN
29-Mar APIN
5-Apr SHOP
12-Apr APIN
12-Apr APIN
26-Apr SHOP
Pulled NSTA
Pulled NSTA
Pulled NSTA
Pulled SHOP
Pulled SHOP
Pulled NSTA


The above columns are C and D, and I am trying to force A1 to give me a
count when column C is in the month of March, and D = "reg". I have a macro
that filters C and D by the selected macro, so the month value will need to
change according to the macro. I tried COUNT, and other versions, but it
doesn't like that.

Help?