+ Reply to Thread
Results 1 to 6 of 6

Recorded macro doing more than recorded?

  1. #1
    Registered User
    Join Date
    06-19-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    13

    Recorded macro doing more than recorded?

    Hello guys,

    I recorded a macro which simply did Text to Columns on C14:C5000 using Space deliminator with Consecutive deliminator enabled. This works fine when I do it manually and copies to column D, but as soon as I run it in a macro it puts AM or PM in Column E?

    Col C holds data like this '22/06/2014 07:30:00'

    What I want:
    Col C '22/06/2014'
    Col D '07:30:00'

    What I'm getting:
    Col C '22/06/2014'
    Col D '07:30:00'
    Col E 'AM'

    Macro script I'm using:
    Please Login or Register  to view this content.
    Any help is appreciated. Thanks
    Last edited by Trending; 06-26-2014 at 08:59 AM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Recorded macro doing more than recorded?

    Are you running this on the same data and with the same cell(s) selected as you had when you recorded the macro?

    Do you just want to separate the date and time?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    06-19-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    13

    Re: Recorded macro doing more than recorded?

    Hi Norie,

    That is correct. Same cells/data

  4. #4
    Registered User
    Join Date
    06-19-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    13

    Re: Recorded macro doing more than recorded?

    Please Login or Register  to view this content.
    I solved this by Text to Column using fixed width and formatting the columns to Date and Time

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Recorded macro doing more than recorded?

    I tried a few variations but nothing worked, must have missed that one.

  6. #6
    Registered User
    Join Date
    06-19-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    13

    Re: Recorded macro doing more than recorded?

    lol don't feel bad. It's had my head thumping for hours. Something that should be really simple turns into a pain.

+ 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. Need help with recorded macro
    By Chippi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-08-2014, 05:43 AM
  2. [SOLVED] Help with recorded macro
    By siumui00 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-19-2013, 02:59 PM
  3. [SOLVED] Recorded Pivot Table Macro Doesn't Do What I Recorded!
    By diakonos1984 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2013, 11:01 AM
  4. Macro does more than I recorded
    By martinjr in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-08-2011, 07:59 PM
  5. Recorded macro won't run
    By rjamison in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-13-2005, 09:05 PM

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