Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
external usenet poster
 
Posts: 29
Default creating an array

I want to create a time array. For example, cell A1 is the starting time of
6:00 AM, and cell B1 which contains the ending time of 2 PM. From 6 am to 2
pm is exactly 8 hours. I want to create an array of 8 elements with the
starting value of 6:00 AM, and the last value in the array with the value of
2 pm. Of course, the array will start from cell C1 to J1 or 8 elements
cell. Is there a formula to do? or is it possible to do this in excel at
all? It would be similar to the one below.

A B C D E
F G --- J
6:00 AM 2:00 PM 6:00 AM
2:00 PM


  #2   Report Post  
Posted to microsoft.public.excel.newusers,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
external usenet poster
 
Posts: 29
Default creating an array

ignore the drawing below, it is messed up.
"Richard" wrote in message
. ..
I want to create a time array. For example, cell A1 is the starting time
of 6:00 AM, and cell B1 which contains the ending time of 2 PM. From 6 am
to 2 pm is exactly 8 hours. I want to create an array of 8 elements with
the starting value of 6:00 AM, and the last value in the array with the
value of 2 pm. Of course, the array will start from cell C1 to J1 or 8
elements cell. Is there a formula to do? or is it possible to do this in
excel at all? It would be similar to the one below.

A B C D E F
G --- J
6:00 AM 2:00 PM 6:00 AM 2:00 PM



  #3   Report Post  
Posted to microsoft.public.excel.newusers,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
Sox Sox is offline
external usenet poster
 
Posts: 4
Default creating an array


"Richard" wrote in message
. ..
I want to create a time array. For example, cell A1 is the starting time
of 6:00 AM, and cell B1 which contains the ending time of 2 PM. From 6 am
to 2 pm is exactly 8 hours. I want to create an array of 8 elements with
the starting value of 6:00 AM, and the last value in the array with the
value of 2 pm. Of course, the array will start from cell C1 to J1 or 8
elements cell. Is there a formula to do? or is it possible to do this in
excel at all? It would be similar to the one below.

A B C D E F
G --- J
6:00 AM 2:00 PM 6:00 AM 2:00 PM


Richard,

Try the TIME function, which takes the values (hours,minutes,seconds), for
example: = TIME(1,0,0) is one hour.

Then use the TIME function to add one hour to subsequent entries. For your
example:

A1 6:00 AM

B1 =A1 + TIME(1,0,0)

C1 =B1 + TIME(1,0,0)

....etc.

For a worksheet, simplfy the entries by just copying the formula in cell B1
across to add one hour to subsequent cells.

Regards,

Sox


  #4   Report Post  
Posted to microsoft.public.excel.newusers,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
external usenet poster
 
Posts: 15,768
Default creating an array

Try this:

Enter this formula in C1 and copy across until you get blanks:

=IF(COUNT($A1:$B1)<2,"",IF($A1+(COLUMNS($A:A)-1)/24$B1,"",$A1+(COLUMNS($A:A)-1)/24))

Format the cells as TIME

Biff

"Richard" wrote in message
. ..
I want to create a time array. For example, cell A1 is the starting time
of 6:00 AM, and cell B1 which contains the ending time of 2 PM. From 6 am
to 2 pm is exactly 8 hours. I want to create an array of 8 elements with
the starting value of 6:00 AM, and the last value in the array with the
value of 2 pm. Of course, the array will start from cell C1 to J1 or 8
elements cell. Is there a formula to do? or is it possible to do this in
excel at all? It would be similar to the one below.

A B C D E F
G --- J
6:00 AM 2:00 PM 6:00 AM 2:00 PM



  #5   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.newusers
external usenet poster
 
Posts: 6,953
Default creating an array

1 6 AM
2 7 AM
3 8 AM
4 9 AM
5 10 AM
6 11 AM
7 12 PM
8 1 PM
9 2 PM

If you want to start with 6 and end with 2, you need 9 elements.

--
Regards,
Tom Ogilvy

"Richard" wrote:

I want to create a time array. For example, cell A1 is the starting time of
6:00 AM, and cell B1 which contains the ending time of 2 PM. From 6 am to 2
pm is exactly 8 hours. I want to create an array of 8 elements with the
starting value of 6:00 AM, and the last value in the array with the value of
2 pm. Of course, the array will start from cell C1 to J1 or 8 elements
cell. Is there a formula to do? or is it possible to do this in excel at
all? It would be similar to the one below.

A B C D E
F G --- J
6:00 AM 2:00 PM 6:00 AM
2:00 PM



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
Creating an column of values from an existing array PA New Users to Excel 1 November 20th 06 12:27 PM
Creating an array to find months ssrvant Excel Worksheet Functions 4 June 24th 06 01:49 AM
2 way Vlookup - Creating array arguments from columns Hari Excel Discussion (Misc queries) 1 May 11th 06 01:18 PM
Creating Array from Pivot Table WCoaster Excel Worksheet Functions 3 February 27th 06 10:13 PM
Creating array formulaes in macro Raj Excel Discussion (Misc queries) 1 April 28th 05 09:20 AM


All times are GMT +1. The time now is 05:42 PM.

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"