ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Is date within a range? (https://www.excelbanter.com/excel-worksheet-functions/7539-date-within-range.html)

AndrewB

Is date within a range?
 
I have a list of date & times of deliveries. I also have a list of date &
times of price changes.
I want to identify if, for each delivery time, it falls within 7 hours
either side of any one of the price changes and, if so, which side.

Can anyone help? It would be much appreciated :-)

hrlngrv - ExcelForums.com

AndrewB wrote...
I have a list of date & times of deliveries. I also have a

list of date &
times of price changes. I want to identify if, for each delivery

time, it
falls within 7 hours either side of any one of the price changes

and, if so,
which side.


Given a date/time of delivery, D, and the date time of a price change,
C, the formula you seek is

=IF(ABS(D-C)<=7/24,IF(D<C,"Before","On or After"),"Outside 7
Hours")

If there were m delivery dates/times in a horizontal range D and n
price change dates/times in a vertical range C, the formula above
would be an array formula that would return an m-column by n-row
array result.
---------
www.coffeecozy.com

Use your Bodum and give up cold coffee for good!

Peo Sjoblom

"hrlngrv - ExcelForums.com" wrote in
message ...
AndrewB wrote...
I have a list of date & times of deliveries. I also have a

list of date &
times of price changes. I want to identify if, for each delivery

time, it
falls within 7 hours either side of any one of the price changes

and, if so,
which side.


Given a date/time of delivery, D, and the date time of a price change,
C, the formula you seek is

=IF(ABS(D-C)<=7/24,IF(D<C,"Before","On or After"),"Outside 7
Hours")

If there were m delivery dates/times in a horizontal range D and n
price change dates/times in a vertical range C, the formula above
would be an array formula that would return an m-column by n-row
array result.
---------
www.coffeecozy.com

Use your Bodum and give up cold coffee for good!


Coffeecozy.com?

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)




All times are GMT +1. The time now is 10:48 AM.

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