PC Review


Reply
Thread Tools Rate Thread

Convert Continuous Time 'Range' into Array of Discrete Time Values?

 
 
Alan
Guest
Posts: n/a
 
      22nd Jan 2004
Hi All,

Using worksheet formulae, not VBA, I would like to be able to convert
a time range (for example 22 Jan 2004, 6am through 22 Jan 2004, 9am =
38008.25 to 38008.375) into an array of discrete time values (for
example every 30 mins).

This would mean input cells containing, say:

38008.25
38008.375
((30/60)/24) = 0.0208333333333333

and an output array of say:

{38008.25,38008.2708333333,38008.2916666667,38008.3125,38008.333333333
3,38008.3541666667,38008.375}

I feel that this should be quite easy but I am having a brain block on
it so any help would be appreciated.

Thanks,

Alan.


 
Reply With Quote
 
 
 
 
Mike
Guest
Posts: n/a
 
      22nd Jan 2004
A B
1 22/1/2004 6:00 38008.2500000000
2 22/1/2004 6:30 38008.2708333333
3 22/1/2004 7:00 38008.2916666667
4 22/1/2004 7:30 38008.3125000000
5 22/1/2004 8:00 38008.3333333333
6 22/1/2004 8:30 38008.3541666667
7 22/1/2004 9:00 38008.3750000000

1. Enter Formula =A1+"0:30:00" into Cell A2 and copy it downward.
2. Enter Formula =A1 into Cell B1 with Format of 0.0000000000 and copy it downward.

--
Mike

Ref to "Alan" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
 
Reply With Quote
 
Max
Guest
Posts: n/a
 
      22nd Jan 2004
If A1:A7 contains

1/22/04 6:00 AM
1/22/04 6:30 AM
1/22/04 7:00 AM
1/22/04 7:30 AM
1/22/04 8:00 AM
1/22/04 8:30 AM
1/22/04 9:00 AM

Select B1:B7

Put in the formula bar:

=DATEVALUE(TEXT(A1:A7,"m/d/yy h:mm AM/PM"))+TIMEVALUE(TEXT(A1:A7,"m/d/yy
h:mm AM/PM"))

and array-enter [i.e. press Ctrl + Shift + Enter]

Format B1:B7 to desired # of decimal places

B1:B7 will return the output array

--
Rgds
Max
xl 97
----------------------------------
Use xdemechanik <at>yahoo<dot>com for email
-----------------------------------------
"Alan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
>
> Using worksheet formulae, not VBA, I would like to be able to convert
> a time range (for example 22 Jan 2004, 6am through 22 Jan 2004, 9am =
> 38008.25 to 38008.375) into an array of discrete time values (for
> example every 30 mins).
>
> This would mean input cells containing, say:
>
> 38008.25
> 38008.375
> ((30/60)/24) = 0.0208333333333333
>
> and an output array of say:
>
> {38008.25,38008.2708333333,38008.2916666667,38008.3125,38008.333333333
> 3,38008.3541666667,38008.375}
>
> I feel that this should be quite easy but I am having a brain block on
> it so any help would be appreciated.
>
> Thanks,
>
> Alan.
>
>



 
Reply With Quote
 
Max
Guest
Posts: n/a
 
      22nd Jan 2004
Scratch earlier suggestion ...

Simpler just to:

Select B1:B7

Put in the formula bar:

=A1:A7+0

(or =A1:A7*1)

and array-enter [i.e. press Ctrl + Shift + Enter]

Format B1:B7 to desired # of decimal places

B1:B7 will return the output array

--
Rgds
Max
xl 97
----------------------------------
Use xdemechanik <at>yahoo<dot>com for email
-----------------------------------------


 
Reply With Quote
 
Alan
Guest
Posts: n/a
 
      22nd Jan 2004
"Max" <(E-Mail Removed)> wrote in message
news:eJx%(E-Mail Removed)...
>
> Scratch earlier suggestion ...
>
> Simpler just to:
>
> Select B1:B7
>
> Put in the formula bar:
>
> =A1:A7+0
>
> (or =A1:A7*1)
>
> and array-enter [i.e. press Ctrl + Shift + Enter]
>
> Format B1:B7 to desired # of decimal places
>
> B1:B7 will return the output array
>
> --
> Rgds
> Max
>


Hi Guys,

Re-reading my OP I was not explicit enough - apologies for that.

I would like to be enter the three inputs into cells:

38008.25
38008.375
((30/60)/24) = 0.0208333333333333

*However*, these particular inputs produce an array answer which is 1
by 7 elements (or 7 by 1).

What if my third input was, say, 20 mins ((20/60)/24) though?

The answer would then be 10 elements so using a fixed range (B1:B7
say) will not work.

I am guessing I need to use the INDIRECT function at the end to derive
the range?

Hope that helps clarify a bit more and I feel I am closer now with
your help!

Alan.



 
Reply With Quote
 
Max
Guest
Posts: n/a
 
      23rd Jan 2004
Sorry, Alan. I'm out of ideas on this.

Maybe others would step-in with offerings for you.

--
Rgds
Max
xl 97
----------------------------------
Use xdemechanik <at>yahoo<dot>com for email
-----------------------------------------


 
Reply With Quote
 
Max
Guest
Posts: n/a
 
      23rd Jan 2004
Sorry, Alan. I'm out of ideas on this.

Maybe others would step-in with offerings for you.

--
Rgds
Max
xl 97
----------------------------------
Use xdemechanik <at>yahoo<dot>com for email
-----------------------------------------


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert time to time range =?Utf-8?B?c3Vlc2hl?= Microsoft Excel Misc 2 25th Mar 2007 11:58 PM
Subform issue - show discrete values in Continuous Forms mode =?Utf-8?B?YWxleGhhdHppc2F2YXM=?= Microsoft Access VBA Modules 6 13th Jan 2006 08:10 AM
Re: How do I convert Two Time Values to Seconds? Allen Browne Microsoft Access 0 15th Sep 2004 06:25 PM
Continuous Range Lookup from Discrete Table Krishna Khemraj Microsoft Access Queries 4 28th Jul 2004 06:24 PM
How to activate array formulas in a range of cells all at the same time? Karenna Microsoft Excel Misc 4 29th Feb 2004 11:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:42 AM.