+ Reply to Thread
Results 1 to 2 of 2

Macro to Copy Date in Active Cell and Re-Paste into Same Cell as Text?

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    ggg
    MS-Off Ver
    Excel 2010
    Posts
    1

    Question Macro to Copy Date in Active Cell and Re-Paste into Same Cell as Text?

    I don't know much about VBA, but I'd like to create a keyboard shortcut macro to convert a selected date into text. However, I need to use the =TEXT(date, "mm-ddd-yy") formula instead of just re-formatting as text. For some reason, excel displays these differently.

    An example of what I'd like to do:

    Say the selected cell contains the date 1/9/13. I'd like to have the macro copy this date, run the formula =Text(date, "mm-ddd-yy"), then paste the result 09-Jan-13 back into the same selected cell.

    I'd appreciate any ideas you have. Thanks.

  2. #2
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    792

    Re: Macro to Copy Date in Active Cell and Re-Paste into Same Cell as Text?

    Will this do the trick for you?

    Please Login or Register  to view this content.
    Kind regards, Harry.

+ 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