![]() |
Date/time range based calculations
I have a column of values associated with unique dates/times. I need to be
able to perform different calculations on the column of values based on whether or not their associated unique dates/times are between a set of date/time ranges (upper and lower limits). What function should I be using to calculate column C based on the date/time ranges? Example: Column A Column B Column C Row 1 Start Time 03/01/2005 00:29:59 Row 2 End Time 03/01/2005 00:59:59 Row 3 Row 4 DATE/TIME VALUE CALCULATIONS Row 5 03/01/2005 00:29:59 1 2 Row 6 03/01/2005 00:59:59 1 2 Row 7 03/01/2005 01:29:59 2 6 c5 = b5*2 because a5 is in the time range of b1:b2 c6 = b6*2 because a6 is in the time range of b1:b2 c7 = b7*3 because a7 is not in the time range of b1:b2 |
C5: =IF(AND(A5=$B$1,A5<=$B$2),B5*2,B5*3)
and copy down -- HTH RP (remove nothere from the email address if mailing direct) "jim314" wrote in message ... I have a column of values associated with unique dates/times. I need to be able to perform different calculations on the column of values based on whether or not their associated unique dates/times are between a set of date/time ranges (upper and lower limits). What function should I be using to calculate column C based on the date/time ranges? Example: Column A Column B Column C Row 1 Start Time 03/01/2005 00:29:59 Row 2 End Time 03/01/2005 00:59:59 Row 3 Row 4 DATE/TIME VALUE CALCULATIONS Row 5 03/01/2005 00:29:59 1 2 Row 6 03/01/2005 00:59:59 1 2 Row 7 03/01/2005 01:29:59 2 6 c5 = b5*2 because a5 is in the time range of b1:b2 c6 = b6*2 because a6 is in the time range of b1:b2 c7 = b7*3 because a7 is not in the time range of b1:b2 |
All times are GMT +1. The time now is 06:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com