+ Reply to Thread
Results 1 to 8 of 8

Concatenate adds 0

  1. #1
    Registered User
    Join Date
    04-19-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    20

    Concatenate adds 0

    Hi All, hope you're all keeping well. I am TG
    My problem
    I'm creating a concatenate column in a sheet which gets its info from another sheet. I want to join house no's and street names e.g. in column L 23 & in column M Main street
    My formula is
    =CONCATENATE(L1," ",M1), However when there is no number in column L, concatenate puts in a "0" and I get "0 main street". If there's no number I just want Main Street.
    The space produced by " " is not a problem but if I could loose that also when there's no number it would be great.
    I have set all the pages involved to "not show" zero's
    I've also tried =IF(L1<=0,CONCATENATE(L1,M1),CONCATENATE(L1," ",M1))

    Thanks in advance.

    j

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Concatenate adds 0

    Try this

    =IF(L1="","",L1&" ")&M1
    Audere est facere

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Concatenate adds 0

    I can not replicate this. If L1 is empty nothing is displayed

    can you post example workbook?
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    04-19-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Concatenate adds 0

    Quote Originally Posted by daddylonglegs View Post
    Try this

    =IF(L1="","",L1&" ")&M1
    Thanks daddylonglegs,

    Tried your formula but unfortunately with no success.

    Hi Andy
    I opened another workbook and copied and used paste special/values and was able to get the result I wanted.
    Could it be to do with the source being on another page.
    e.g. columns L shows "=box_identity!E1" & column M shows "=box_identity!F1" 9my quote marks)

    The workbook is huge so I'm not sure what I could send.

    Also I'm using excel 2003.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Concatenate adds 0

    =CONCATENATE(IF(L1=0,"",L1),IF(M1=0,"",M1))

    so L and M are contain the result of formula which could be 0 if E or F cells are empty.

    You could put the test in L and M, =IF(box_identity!E1="","",box_identity!E1), and then your orginal formula should work.

  6. #6
    Registered User
    Join Date
    04-19-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Concatenate adds 0

    Excellent, almost perfect
    =CONCATENATE(IF(L1=0,"",L1),IF(M1=0,"",M1)) works perfectly with no number in column L, however with content in both columns there's no space between them in the concatenate column.

    I don't fully understand what you mean with
    "You could put the test in L and M, =IF(box_identity!E1="","",box_identity!E1), and then your original formula should work."
    I tried putting that formula into my work sheet with your formula in the concatenate column but all were blank.
    I meant with my original formula in concatenate column
    j
    Last edited by d.i.y. man; 09-10-2013 at 09:40 AM. Reason: typo

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Concatenate adds 0

    well you simple add the space in the concatenate formula

    =CONCATENATE(IF(L1=0,"",L1)," ",IF(M1=0,"",M1))

    I mean rather than test the contents of L1 and M1 in the concatenate formula you could use a more complex formula in L1 and M1

    currrently L1: =box_identity!E1

    change it to,
    L1: =IF(box_identity!E1="","",box_identity!E1)

  8. #8
    Registered User
    Join Date
    04-19-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Concatenate adds 0

    Thank You Andy, problem solved.
    Both suggestions work.
    However I'll use the concatenate formula only as it's the only change to the original sheet.

    thanks again, I'm sure I'll be back

+ 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: 19
    Last Post: 03-04-2013, 01:16 PM
  2. Replies: 0
    Last Post: 12-22-2011, 03:42 PM
  3. Replies: 2
    Last Post: 04-12-2010, 12:35 PM
  4. Replies: 2
    Last Post: 01-06-2010, 05:51 AM
  5. [SOLVED] [SOLVED] I know how to concatenate ,can one de-concatenate to split date?
    By QUICK BOOKS PROBLEM- in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-26-2005, 01: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