View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jim Jackson
 
Posts: n/a
Default Counting occurrences in one column based on an occurrence in a

No, the names column has first names only. In the date range I have set in
the formula, there are five dates with a couple of different names, one per
row, for the five rows. I am trying to get a formula to tell me how many
times that name appears in the specified date range.

A B
John 3/5/2005
Jane 3/15/2005
John 3/20,2005
John 3/27/2005
Jane 3/31/2005

The above is a representation of the spreadsheet, at least the columns with
the pertinent data. I need the formula to return a "3" for John's occurences
and a "2" for Jane's and "0" for any other name in the complete sheet.

Thanks,

Jim

"Ron Coderre" wrote:

If you are looking to match if "fred" is located anywhere in the cell (eg The
Fred Company) for the month of MAR 2005, try using this variant of Bob's
formula:

=SUMPRODUCT(--ISNUMBER(FIND("fred",B1:B100)),--(A1:A100=--"2005-03-01"),--(A1:A100<=--"2005-03-31"))

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Jim Jackson" wrote:

=COUNTIF((B2:B1000),"*Fred*")-(COUNTIF((A2:A1000),"=3/1/2005")-(COUNTIF((A2:A1000),"=4/1/2005")))

This is the formula I am trying to get to work. This does not work as it
stands. It returns a "7" when there are five dates in the Dates column and
No "Fred"s in the names column.

I think I am close but can't seem to get any further.

Jim

"Ron Coderre" wrote:

Do the date ranges actually contain text (JAN06, MAR06, etc)?
or do they contain actual dates (1/12/2006, 2/13/06,etc)?

It makes a big difference in the kind of solution you need.

***********
Regards,
Ron

XL2002, WinXP-Pro


"Jim Jackson" wrote:

I have one column with names and another with date ranges (JAN06) etc. I
want to count the number of times a name occurs within a given date range.