View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Counting dates - FRUSTRATED!!!!!

Suspect that your "dates" data may not be real dates. You can try converting
it all at one go to real dates by selecting the "dates" col, then click Data
Text to Columns, click Next Next. In step 3 of the wizard, check "Date"

under Col data format, then choose the appropriate date format, eg: MDY from
the droplist. Click Finish

Then ... assuming real dates are in A2:A100, unit/floor (eg: CTUN) in B2:B100
These 2 formulas should work ok

=COUNTIF(A2:A100,--"08 Jan 2009")
to count how many times the date: 08 Jan 2009 appears

=SUMPRODUCT((A2:A100= --"08 Jan 2009")*(B2:B100="CTUN"))
to count how many times CTUN appears in col B
where the date in col A is: 08 Jan 2009

Adapt to suit ..
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"D Boyles" wrote:
Using Excel 2003.

I am trying to count the number of times a date (i.e. 1/1/2009 or 1/8/2009)
appears in a range of cells.

I also want to be able to count the number of times a unit/floor appears on
a gvien date (i.e. CTUN appears 3 times on 01/1/2009 and 6 times on 1/8/2009)
the unit is in one column and the date in another column.

I have tried every kind of function - countif, sumif, count, dcount and I
cannot get the calculation to work. I am sure that it has something to do
with the syntax but I just can't get it right.