Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jim314
 
Posts: n/a
Default 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

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count cells in one range based on parameters in another range dave roth Excel Worksheet Functions 2 March 29th 05 05:33 PM
How can I assign a range starting cell based on a variable locati. feman007 Excel Discussion (Misc queries) 1 March 9th 05 11:41 PM
How can I assign a range starting cell based on a variable locati. feman007 Excel Worksheet Functions 3 March 9th 05 11:40 PM
Define a range based on another named range Basil Excel Worksheet Functions 2 February 21st 05 01:47 PM
Can you average data in 1 column based on a range of values in another? kman24 Excel Worksheet Functions 2 November 17th 04 02:09 PM


All times are GMT +1. The time now is 12:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"