ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Dates (https://www.excelbanter.com/excel-worksheet-functions/140277-dates.html)

phil

Dates
 
Hi

I Am trying to work out the difference between 2 dates, if the dates are
under say 30 day i need it to count it.

so if i have
23/04/2007 & 2404/2007
and
22/01/2007 & 24/04/2007

It will only count the cells that have a date less than 30days?
Any suggestion

Thanks for your help

Teethless mama

Dates
 
In C1: =--((B1-A1)<30)
copy down
then sum all 1s in column C

"phil" wrote:

Hi

I Am trying to work out the difference between 2 dates, if the dates are
under say 30 day i need it to count it.

so if i have
23/04/2007 & 2404/2007
and
22/01/2007 & 24/04/2007

It will only count the cells that have a date less than 30days?
Any suggestion

Thanks for your help


T. Valko

Dates
 
Try this:

I'm assuming the dates are in 2 columns:

=SUMPRODUCT(--(ISNUMBER(A1:A10)),--(ISNUMBER(B1:B10)),--(ABS(A1:A10-B1:B10)<30))

Biff

"phil" wrote in message
...
Hi

I Am trying to work out the difference between 2 dates, if the dates are
under say 30 day i need it to count it.

so if i have
23/04/2007 & 2404/2007
and
22/01/2007 & 24/04/2007

It will only count the cells that have a date less than 30days?
Any suggestion

Thanks for your help




Bob Phillips

Dates
 
=SUMPRODUCT(--(A2:A20<""),--(B2:B20<""),--((A2:A20-B2:B20)<30))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"phil" wrote in message
...
Hi

I Am trying to work out the difference between 2 dates, if the dates are
under say 30 day i need it to count it.

so if i have
23/04/2007 & 2404/2007
and
22/01/2007 & 24/04/2007

It will only count the cells that have a date less than 30days?
Any suggestion

Thanks for your help





All times are GMT +1. The time now is 01:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com