+ Reply to Thread
Results 1 to 8 of 8

Concatenate string and function

  1. #1
    Registered User
    Join Date
    12-02-2007
    Posts
    23

    Thumbs up RESOLVED - Concatenate string and function

    I want to concatenate string and function together. I can show the values now in two separate columns, but I want them in one column.

    example:

    Date: =('Sheet1!A2)

    Current:

    Sheet2 A1 = Date:
    Sheet2 B2 =('Sheet1!A2)

    Thanks in advance for any help!!
    Last edited by nousername; 03-11-2008 at 09:39 PM.

  2. #2
    Forum Contributor
    Join Date
    06-13-2004
    Posts
    120
    Are you trying to show the "Date: " and the ('Sheet1!A2') value in the same cell?

    or are you trying to show something different?

    =concatenate("Date: ", "....", etc...)

  3. #3
    Forum Contributor
    Join Date
    06-13-2004
    Posts
    120
    This is something else you can do, if you know it's a date...I know what you're referring to with the function for a date in the concatenate, it returns the serial date, not the actual date...but you can convert it in the formula as listed below...

    =CONCATENATE("Date: ", CONCATENATE(MONTH(A1), "/", DAY(A1), "/", YEAR(A1)))

  4. #4
    Registered User
    Join Date
    12-02-2007
    Posts
    23
    The date data point is located on sheet one. I am trying to show this date on sheet two.

    Data point on sheet one is in cell A2.

    Currently I am calling that data point on sheet two cell b2 using the following: =('Sheet1'!A2)

    On sheet two cell A1, I have the string Date:

    On sheet two cell B2, I have the date from sheet one.

    How can I show both the string (Date and function =('Sheet1'!A2) in A1 on sheet 2?

    I want A1 on sheet 2 to look like this: Date: mm/dd/yyyy

  5. #5
    Forum Contributor
    Join Date
    06-13-2004
    Posts
    120
    I am unaware of a way to keep Excel from converting the date string to the serial date number. However, you can use the below to work around it.

    =CONCATENATE("Date: ", CONCATENATE(MONTH(Sheet1!A2), "/", DAY(Sheet1!A2), "/", YEAR(Sheet1!A2)))

  6. #6
    Registered User
    Join Date
    12-02-2007
    Posts
    23
    I tried using your code example, but I received an "invalid name error."

    =CONCATENATE("Date: ", CONCATENATE(MONTH(Information System Data!A2), "/", DAY(Information System Data!A2), "/", YEAR(Information System Data!A2)))


    In cell B2, I am using this code =('Information System Data'!A2), which produces this 03/11/2008.

  7. #7
    Forum Contributor
    Join Date
    06-13-2004
    Posts
    120
    In that case, since there is spaces in the page name, you will need to ' ' them...

    =CONCATENATE("Date: ", CONCATENATE(MONTH('Information System Data'!A2), "/", DAY('Information System Data'!A2), "/", YEAR('Information System Data'!A2)))

    Sorry, I didn't realize you were using different page names.

  8. #8
    Registered User
    Join Date
    12-02-2007
    Posts
    23
    Thanks!!! Your Example Fixed My Issue!!!

+ 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