# count number of dates in a row of cel before or after a variable d

T

#### TBA

Hi there. I want to create a formula to count the number of dates that fall
before or after a set date. The sheet is structured so that there is a
column with the date of an interview, call it 'E'.
There are then a number of dates recorded in rows â€˜Nâ€™ to â€˜APâ€™. I want to
create two separate formula that count the number of dates between â€˜Nâ€™ and
â€˜APâ€™ that fall before or after the date in â€˜Eâ€™. I tried:
â€œ=COUNTIF(N2:BR2,N2:BR2<C2)â€ but it returns â€˜0â€™. Any suggestions?

Hi

the equal sign left to the formula line, now fill in your range and
condition and hit enter.

The Formula should look like this:

=COUNTIF(N2:BR2,"<E2")

Hopes this helps.

=COUNTIF(N2:BR2,"<" & C2)
will count the number of dates between N2 and PR2 that are less than the
date in C2

thanks very much for that- would you mind explaining the use of the quote
marks and the & ? cheers

one last request on this one.
the number of dates in N to AP vary from line to line.
how would I get a formula to tell me what the earliest date in the group of
cells is?

thanks

As dates are just numbers to Excel, the earliest is:
=min(n2:ap2)

Regards,
Fred.