+ Reply to Thread
Results 1 to 3 of 3

Concatenate Date, copy/paste value

  1. #1
    Registered User
    Join Date
    08-10-2012
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    78

    Concatenate Date, copy/paste value

    Hi-

    I'm not sure why this isn't working correctly. I have a spreadsheet that needs to concatenate dates (because of a multi-function search & replace macro, I need to keep fields separated). So cell
    A7 is 4/13/2013
    A8 is =TEXT($A$7,"mmmm")
    A9 is 13, 2013 and
    A10 is =CONCATENATE(A8,A9)

    I need a macro to copy the concatenated value in A10 and paste its value in A11. It does just that, but it doesn't seem it's legitimate date unless I click into the function bar and hit enter (Which doesn't seem to record in macro properly). It either remains as text (despite the cell formatting), or converts it to a duplicate of A10's formula.

    The ultimate goal is one macro which will do a search (with prompt dialog boxes) for "April" (for example), replace it with "May" or "March" or whatever I need that particular session and update cell A11 as an actual date with the new month. I also have formulas which refer to external workbooks that contain worksheets named after each respective month, (i.e., text - not an actual date). So I need the search to serve both functions.

    Thanks so much
    Last edited by jerrydiaz; 07-22-2013 at 03:38 PM.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Concatenate Date, copy/paste value

    Why not just put in A11

    =A7

    And format A11 as your desired date format mmmm dd, yyyy

    Or even better, just apply that format to A7?

  3. #3
    Registered User
    Join Date
    08-10-2012
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    78

    Re: Concatenate Date, copy/paste value

    Because of a multi-function search and replace macro, I cannot search the full date in the macro because it is also performing other functions.

    Excel actually stores the date as a string of numbers (i.e., 4/13/13 is actually 41377 until reformatted as a date. Therefore you cannot search just "April."
    I need to be able to keep the fields separate.

    What I need does work correctly as long as I click into the formula bar and hit enter. But I don't know how to make that happen in a macro, because it just records the action as though I had manually entered the text.
    Anybody please?

+ 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. [SOLVED] Copy, paste cells related to another cell; concatenate if possible
    By bob33 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-29-2013, 12:22 PM
  2. Trying to copy paste formula for concatenate across rows
    By lochans in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-09-2013, 10:11 AM
  3. VBA coding concatenate, copy, paste, remove...
    By sk8shorty01 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 07-29-2011, 01:51 PM
  4. Copy to Clipboard, concatenate, paste
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-18-2010, 05:15 PM
  5. two macros concatenate and copy paste
    By rsheer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-29-2010, 09:39 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