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.
>
>
|