+ Reply to Thread
Results 1 to 6 of 6

Attempting to copy date from one sheet to another

  1. #1
    Registered User
    Join Date
    04-14-2014
    Location
    Texas, United States
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question Attempting to copy date from one sheet to another

    I have been attempting to copy a date & time with a specific format from one sheet to another and add " before and after it in the same field. This is being done to create a specific csv format for date.

    The Formula I am using on sheet3 is - =IF(Sheet1!A3="","",Sheet2!I3&Sheet1!G3&Sheet2!I3)

    The Values I am using are below
    Sheet1!G3 Format = yyyy-mm-dd hh:mm:ss
    Sheet1!G3 = 2014-02-11 07:00:00
    Sheet2!I3 = "

    Formula Results = "40219.2916666667"
    Intended Formula Results = "2014-02-11 07:00:00"

    I have used a similar formula for other fields within the xlsx, and the only one I am having issues is with the date field. It keeps converting to a serial number when the calculation occurs and the copy and formatting occurs.
    Would someone be able to assist me with this formula to get it to come out with the intended results?

    Thank you very much

    Jim

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

    Re: Attempting to copy date from one sheet to another

    Try

    =IF(Sheet1!A3="","",TEXT(Sheet1!G3,"yyy-mm-dd hh:mm:ss"))

    I'm not sure if you actually NEED the quote marks around it, but you can still do the concatenate with the " in I3

  3. #3
    Registered User
    Join Date
    04-14-2014
    Location
    Texas, United States
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Attempting to copy date from one sheet to another

    Quote Originally Posted by Jonmo1 View Post
    Try

    =IF(Sheet1!A3="","",TEXT(Sheet1!G3,"yyy-mm-dd hh:mm:ss"))

    I'm not sure if you actually NEED the quote marks around it, but you can still do the concatenate with the " in I3
    I attempted this and it still returned the serial number "40219.2916666667".
    Is it returning the serial number instead of the date because I am adding the " before and after the date?

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

    Re: Attempting to copy date from one sheet to another

    Depends on where exactly you put the " marks.
    Put them before and after the TEXT function.
    NOT before and after the G3 value inside the Text function.

    =IF(Sheet1!A3="","",Sheet2!I3&TEXT(Sheet1!G3,"yyy-mm-dd hh:mm:ss")&Sheet2!I3)

  5. #5
    Registered User
    Join Date
    04-14-2014
    Location
    Texas, United States
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Attempting to copy date from one sheet to another

    Thank you so much, this has been driving me crazy of on on for over a month trying to figure out how to get rid of the serial number. I normally try to figure these things out on my own, before asking for help, doing so helps me remember how to do it and get a better understanding of how to do functions, but I hit the point of frustration on this one.

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

    Re: Attempting to copy date from one sheet to another

    Glad to help, thanks for the feedback.

+ 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. Replies: 3
    Last Post: 10-28-2013, 08:11 AM
  2. Replies: 1
    Last Post: 11-26-2012, 04:34 PM
  3. Replies: 1
    Last Post: 08-24-2012, 02:56 AM
  4. Replies: 0
    Last Post: 02-24-2012, 02:46 PM
  5. [SOLVED] adding day (sunday, Monday) to date-What I'm attempting to do
    By RickyDee in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 05: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