Date/time range based calculations

G

Guest

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
 
B

Bob Phillips

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top