HI PD,
Here's an extension to what Wayne has provided. The table set below contains TWO examples, one using the appointment durations in column B of the table "Data", the other using the 'durations' entered as numbers expressing the minutes and parts of minutes in column C of "Data." The entries in each column are the same length of time for the same date.
Example 1:
Columns A and B of Data contain the date and duration in minutes and seconds of each appointment.
Columns A, B and C of Summary contain the start and end dates of the period in which the count is to take place, and the count of appointments in that period lasting more than one minute.
Column A of Minimum contains the minimum length of appointment to be included in the count.
The formula below is entered into Summary::C2, and filled down.
Summary::C2: =COUNTIFS(Data :: $A,">="&$A2,Data :: $A,"<"&$B2,Data :: B,">="&Minimum::A$2)
Example 2:
Columns A and B of Data contain the date and a number corresponding to the duration in minutes and fraction of a minute of each appointment.
Columns A, B and C of Summary contain the start and end dates of the period in which the count is to take place, and the count of appointments in that period lasting more than one minute.
Column B of Minimum contains the minimum length of appointment to be included in the count, expressed as a number indicating that length in minutes.
The formula below is entered into Summary::D2, and filled down.
=COUNTIFS(Data :: $A,">="&$A2,Data :: $A,"<"&$B2,Data :: C,">="&Minimum::B$2)
You wrote: "from a maintenance point of view I think it would be cleaner to use a constant."
Perhaps, providing you will never want to change that constant. If you do change the constant, then you will need ot edit every formula using that constant. If you use a cell reference to pick up the 'constant,' then hanging the constant means making a single change of the value in that one cell.
That said, the formulas are easy to change.
The formula in Summary, column C, which uses the Duration values in Data column B needs the change shown here. Change the formula in C2, then fill to other cells in the column (if needed).
=COUNTIFS(Data :: $A,">="&$A2,Data :: $A,"<"&$B2,Data :: B,">="&DURATION(,,,1))
The formula in Summary, column D, which uses the numeric values in Data column C needs the change shown here. Change the formula in D2, then fill to other cells in the column (if needed).
=COUNTIFS(Data :: $A,">="&$A2,Data :: $A,"<"&$B2,Data :: C,">="&1)
Regards,
Barry