+ Reply to Thread
Results 1 to 5 of 5

Based on a Column datetime value auto calculate and populate a datetime range

  1. #1
    Registered User
    Join Date
    02-20-2010
    Location
    San Francisco
    MS-Off Ver
    Excel 2003
    Posts
    3

    Based on a Column datetime value auto calculate and populate a datetime range

    Hi,

    This is for Excel 2003. The requirement is:

    First column (say A1) will have a date time in mm/dd/yyyy hh:mm:ss format (e.g. 02/02/2010 09:10:00),

    Second Column (say A2) will have a frequency time in minutes e.g. 30 minutes

    I need to sum A1 and A2 to populate A3, A4 value should be (A3+A2), A5 value should be (A4+A2) etc. this recurring calculation should be done for a 24 hours period starting from the date time value given in A1

    How to achieve this in Macros? Advances thanks you for your help/inputs

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Based on a Column datetime value auto calculate and populate a datetime range

    Are you sure you want / need a Macro ?

    The same could be achieved using formulae

    A3: =IF(ROWS(A$3:A3)>1/$A$2,"",MAX($A1:$A2)+$A$2)
    copied down to say A100 or as far as you think realistic (based on frequency interval)

    once 24 hours have been accounted for the above will return Nulls

  3. #3
    Registered User
    Join Date
    02-20-2010
    Location
    San Francisco
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Based on a Column datetime value auto calculate and populate a datetime range

    Hi,

    Thank you for your reply. The formula is not working!

    The result (date time range based on the input date time mm/dd/yyyy hh:mm and frequency hh:mm) will span across multiple columns but I wanted this execution to happen just not for one row (say 'A' row) but for multiple rows (say until 'K' row). Do you think a macro would be a better approach in this case? Any inputs?

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Based on a Column datetime value auto calculate and populate a datetime range

    First let's qualify what you want given you've used mixed terminology thus far.

    When you say "First Column A1, Second Column A2" you mean what exactly - A1 & A2 (rows) or A1 & B1 (columns) ?

    To avoid further confusion I'd suggest you post a file which outlines your desired results.

  5. #5
    Registered User
    Join Date
    02-20-2010
    Location
    San Francisco
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Based on a Column datetime value auto calculate and populate a datetime range

    Hi

    It is my bad. On the first row - column A1 will have a date time field (dd/mm/yy hh:mm), columns B1 will have the frequency in hh:mm format, from C1 until 24 hours (B1 value for time base) the columns have to be populated. This pattern/work should happen for multiple rows.

    I am attaching a sample.xls for your reference. Any thoughts, please?
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1