+ Reply to Thread
Results 1 to 9 of 9

Concatenating a Text string with a date - slight problem

  1. #1
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Concatenating a Text string with a date - slight problem

    Hi

    I'm using the following successfully:

    =$F2&TEXT($G2," dd/mm/yy")

    However, if the date cell at $G2 is blank it's still showing a date tagged on to the end of the text, albeit it as: 00/01/00

    Any ideas how if the date cell is blank I can just get it to not show anything at all?

    Ta

  2. #2
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: Concatenating a Text string with a date - slight problem

    Maybe
    =IF($G2="","",$F2&TEXT($G2," dd/mm/yy"))

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Concatenating a Text string with a date - slight problem

    Try

    =IF ($G2="","",$F2&TEXT($G2," dd/mm/yy"))
    Last edited by Fotis1991; 07-05-2013 at 08:01 AM.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Re: Concatenating a Text string with a date - slight problem

    Hi,

    Sorry, poorly explained by myself in the first post.

    I still want it to use the text present in $F2, but I dont want to add 00/01/00 on the end if $G2 is blank.

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Concatenating a Text string with a date - slight problem

    =IF($G2="",$f2,$F2&TEXT($G2," dd/mm/yy"))

  6. #6
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Re: Concatenating a Text string with a date - slight problem

    Thanks

    One further question as a result of this....Im referencing the concatenated cell ($H2) in another worksheet. However the text&date in the one cell means the referenced cell is showing as: 41443 (which is actually 18/06/13) and it's missing the concatenated text from the cell. Any ideas of a way round this?

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Concatenating a Text string with a date - slight problem

    Looks very strange....

    As usual...i have to ask for a small sample workbook.

  8. #8
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Re: Concatenating a Text string with a date - slight problem

    Hi,

    No need, i was referencing the wrong column with VLOOKUP so it was returning the date. DOH! *slaps self*

    Thanks Fotis

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Concatenating a Text string with a date - slight problem

    You are welcome and thanks for the feed back.

    As that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thank you.

+ 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