+ Reply to Thread
Results 1 to 9 of 9

VBA concat code returning 41348 for date instead of 3/15/2013

  1. #1
    Registered User
    Join Date
    12-11-2012
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    51

    VBA concat code returning 41348 for date instead of 3/15/2013

    Hi everyone,

    Need another set of eyes to see what the problem is.

    The code is suppose to concatenate column C if column B =Company with row 2 and row 3 column C. Here is the code
    Please Login or Register  to view this content.
    And attached is the result. I need it to concatenate the company and the date and row 3 col C even if blank.

    I would really appreciate any help I can get on this.

    Thank you

    Bev
    Attached Files Attached Files
    Last edited by Bevg; 05-02-2014 at 11:04 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,196

    Re: VBA concat code returning 41348 for date instead of 3/15/2013

    Have you tried formatting the cell as a Date?


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: VBA concat code returning 41348 for date instead of 3/15/2013

    Hello Bevg,

    Try this macro and let me know if it needs adjusting.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    12-11-2012
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: VBA concat code returning 41348 for date instead of 3/15/2013

    [QUOTE=TMS;3679970]Have you tried formatting the cell as a Date?


    Yes, I did format and nothing happened.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,196

    Re: VBA concat code returning 41348 for date instead of 3/15/2013

    Please Login or Register  to view this content.

    The important bit of code is just this:

    Please Login or Register  to view this content.

    Regards, TMS
    Last edited by TMS; 04-30-2014 at 07:12 PM.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,196

    Re: VBA concat code returning 41348 for date instead of 3/15/2013

    Just looked again. Maybe this is more what you wanted:

    Please Login or Register  to view this content.

    Regards, TMS

  7. #7
    Registered User
    Join Date
    12-11-2012
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: SOLVED:VBA concat code returning 41348 for date instead of 3/15/2013

    THIS DID IT!!! Thank you so much for your help! I can see now where the problem was and how the suggestion did the trick. YOU ROCK!!!!

    Bev
    Last edited by Bevg; 05-02-2014 at 10:48 AM. Reason: ADDED solved to title

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,196

    Re: VBA concat code returning 41348 for date instead of 3/15/2013

    You're welcome.


    Note: you have added "Solved" to the post title. This does not mark the thread as solved.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  9. #9
    Registered User
    Join Date
    12-11-2012
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: VBA concat code returning 41348 for date instead of 3/15/2013

    Thanks again for the instruction to "add SOLVED" to my post.

+ 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. Simple formula to display a date (10/19/2013) as text (October 2013)
    By benyben123 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-20-2013, 03:47 AM
  2. [SOLVED] Automatically returning a date value + 7 days after running some code
    By Skiddedoda in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-26-2013, 05:37 AM
  3. Replies: 10
    Last Post: 08-01-2013, 11:40 AM
  4. Replies: 7
    Last Post: 01-03-2013, 04:13 PM
  5. [SOLVED] concat cells based on date range
    By DamianWarS in forum Excel General
    Replies: 8
    Last Post: 09-14-2012, 12: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