+ Reply to Thread
Results 1 to 10 of 10

Date and time manipulation

  1. #1
    Registered User
    Join Date
    06-29-2016
    Location
    Europe
    MS-Off Ver
    2019 for Mac
    Posts
    8

    Date and time manipulation

    Hello,

    Nice to be here. I am looking for assistance with the following.

    There are two date sections - MDY column and a TIME row. Instead, I would like there to be only a single date and time column.

    I would like to ask, If anyone can please tell me how to automate such conversion/transformation.

    Please see the screenshot below, it should depict what I would like to achieve.

    Thank you!

    WS.png

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Date and time manipulation

    Hi AlexMK,
    maybe so
    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Date and time manipulation

    Assuming they are real date/time values (and not text masquerading as date/time) a simple sum function should work. I might include an INDEX() function as well.

    =A3+INDEX($B$2:$BB$2,rows(A$3:A3)) in A39. Carefully note the use of relative and absolute references to make copying easy (and adapt as needed if I made a mistake). Then copy this formula down.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    06-29-2016
    Location
    Europe
    MS-Off Ver
    2019 for Mac
    Posts
    8

    Re: Date and time manipulation

    Thank you very much nilem and MrShorty!

    Dear nilem, the macro is almost perfect! By almost I mean that dates did not include the time, which instead was printed out separately. Please see screenshot below for a better explanation :-) Otherwise it is perfect! Thank you so much!

    WS2.png

    This is a great quotation, dear MrShorty. It is nice to be among highly literate people on this forum :-)
    Last edited by AlexMK; 06-29-2016 at 10:21 AM.

  5. #5
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Date and time manipulation

    By almost I mean that dates did not include the time
    if your example is according to the screenshot, then clean the cell A1, and try to run macro again.

  6. #6
    Registered User
    Join Date
    06-29-2016
    Location
    Europe
    MS-Off Ver
    2019 for Mac
    Posts
    8

    Re: Date and time manipulation

    Thank you nilem for looking at this once again!

    When I clear the cell A1, Excel gives the following error:

    Run-time error '13':
    Type mismatch

    And debugger higlights/stops at this line: "y(k, 1) = x(i, 1) + x(1, j)"

  7. #7
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Date and time manipulation

    Hi AlexMK,
    Could you please attach an example of your file

  8. #8
    Registered User
    Join Date
    06-29-2016
    Location
    Europe
    MS-Off Ver
    2019 for Mac
    Posts
    8

    Re: Date and time manipulation

    Good morning nilem!

    Forum attachment function button does not work for me properly, so please download the file here:

    http://dropcanvas.com/g1d1l

    I would have provided a link to file from the beginning, but I thought that it might not be proper to do this for a newcomer to forum, as files from unknown people (like me), especially files that can contain macros, can have malicious code and what not.

    Thank you once again!

  9. #9
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Date and time manipulation

    Alex,
    here is your file, try again
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    06-29-2016
    Location
    Europe
    MS-Off Ver
    2019 for Mac
    Posts
    8

    Re: Date and time manipulation

    The code in the attached file performs without issues on my system.

    Thank you very much nilem for your generosity—the time and effort that you put into this request! This is truly a wonderful forum :-)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Prevent time manipulation
    By jokris in forum Excel General
    Replies: 1
    Last Post: 04-05-2016, 05:33 AM
  2. [SOLVED] Time Manipulation
    By vichisov in forum Excel General
    Replies: 3
    Last Post: 04-15-2013, 11:25 AM
  3. Date manipulation
    By elite_thut in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-19-2008, 03:20 AM
  4. time manipulation: 13:20 + 2:40 =???
    By xianwinwin in forum Excel General
    Replies: 3
    Last Post: 12-02-2006, 11:52 AM
  5. [SOLVED] Date manipulation
    By Rick A in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-22-2006, 01:35 PM
  6. [SOLVED] For better Performance in VBA for Excel - Strings manipulation OR Objects manipulation
    By vmegha in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2005, 08:20 PM
  7. Excel Time Manipulation
    By BFiedler in forum Excel General
    Replies: 0
    Last Post: 09-14-2005, 08:15 PM

Tags for this Thread

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