+ Reply to Thread
Results 1 to 22 of 22

Concatenate function

  1. #1
    Registered User
    Join Date
    11-22-2013
    Location
    West Midlands
    MS-Off Ver
    Excel 2010
    Posts
    49

    Concatenate function

    Hi Have used the following function to combine 3 cells into one, this works fine except i have the following issues.

    1. there is no space between each word,
    2. if one cell has no data to combine it displays a 0

    How can i get rid of the 0's in this forumlae

    =CONCATENATE(D6,E6,F6)
    A STEWART - 50005164A DUNCAN - 50005164A EGLINGTON - 50005163


    Need it to show
    A STEWART - 50005164 A DUNCAN - 50005164 A EGLINGTON - 50005163

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Concatenate function

    Try this

    =(D6&" "&E6&" "&F6)
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    11-22-2013
    Location
    West Midlands
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Concatenate function

    Thanks but how do i get rid of the 0's

  4. #4
    Registered User
    Join Date
    11-22-2013
    Location
    West Midlands
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Concatenate function

    I have tried this but it does not display spaces =IF(LEFT(D10,1)="0",REPLACE(D10,1,3," "),D10)&IF(LEFT(E10,1)="0",REPLACE(E10,1,3," "),E10)&IF(LEFT(F10,1)="0",REPLACE(F10,1,3," "),F10)

    This Displays A STEWART - 50005164A DUNCAN - 50005164A EGLINGTON - 5000516 when it should display A STEWART - 50005164 A DUNCAN - 50005164 A EGLINGTON - 50005163

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Concatenate function

    I don't have your spreadsheet and I have no idea that you 0. upload a sample workbook with data and desired output

    To upload a file click on Go Advanced at the bottom of your screen then click on PaperClip icon and Add Files, Select File, locate your file and click Open then click Upload and click Done

  6. #6
    Registered User
    Join Date
    11-22-2013
    Location
    West Midlands
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Concatenate function

    Example of what the forumale does A Jones - 50005164, 0 - L Jones 50005165, P Jones - 50005163

    I dont want the xero to appear. plus i need each name and number to be spaced out as above

    The 3 cells that i am combining into one contan text and numbers

  7. #7
    Registered User
    Join Date
    11-22-2013
    Location
    West Midlands
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Concatenate function

    Basicaly I want to ignore the null values and for each cell i am combining into one to have it spaced out like a jones, p jones, c jones

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Concatenate function

    Try this...

    =TRIM(SUBSTITUTE(SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE(
    D6&","&E6&","&F6," ","~"),","," "))," ",", "),"~"," "))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  9. #9
    Forum Contributor
    Join Date
    05-04-2014
    Location
    New Jersey, United States
    MS-Off Ver
    Excel 2010, 2013
    Posts
    120

    Re: Concatenate function

    Try this:

    =T(D6&" ")&T(E6&" ")&T(F6&" ")

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Concatenate function

    Quote Originally Posted by clabulis View Post
    Try this:

    =T(D6&" ")&T(E6&" ")&T(F6&" ")
    That can have leading/trailing space characters.

    Add TRIM to get rid of them:

    =TRIM(T(D6&" ")&T(E6&" ")&T(F6&" "))

    The formula I suggested adds a comma delimiter between cell entries. After reading the thread again it doesn't look like the OP wants that.

  11. #11
    Registered User
    Join Date
    11-22-2013
    Location
    West Midlands
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Concatenate function

    Nope trim not working

  12. #12
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: Concatenate function

    Try
    =IF(LEFT(D10,1)="0",REPLACE(D10,1,1," "),D10)&IF(LEFT(E10,1)="0",REPLACE(E10,1,1," "),E10)&IF(LEFT(F10,1)="0",REPLACE(F10,1,1," "),F10)
    Click just below left if it helps, Boo?ath?

  13. #13
    Registered User
    Join Date
    11-22-2013
    Location
    West Midlands
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Concatenate function

    Thanks it works it remvoes the xero's but does not put spaces in it displays the following

    A STEWART - 50005164A DUNCAN - 50005165A EGLINGTON - 50005163
    A STEWART - 50005164A DUNCAN - 50005165A EGLINGTON - 50005163
    A STEWART - 50005164A DUNCAN - 50005165A EGLINGTON - 50005163
    A STEWART - 50005164A EGLINGTON - 50005163

    When I want it to display it like this

    A STEWART - 50005164 A DUNCAN - 50005165 A EGLINGTON - 50005163
    A STEWART - 50005164 A DUNCAN - 50005165 A EGLINGTON - 50005163
    A STEWART - 50005164 A DUNCAN - 50005165 A EGLINGTON - 50005163
    A STEWART - 50005164 A EGLINGTON - 50005163

    Can anyone help with this function

  14. #14
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Concatenate function

    Did you pay attention to what Alkey suggested in post#5 ???
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  15. #15
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Concatenate function

    is xero always at the end or will you have xero in middle sometimes?
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  16. #16
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Concatenate function

    actually..doesnt matter
    see attached
    Attached Files Attached Files

  17. #17
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: Concatenate function

    Try
    =IF(LEFT(D10,1)="0",REPLACE(D10,1,1," "),D10&" ")&IF(LEFT(E10,1)="0",REPLACE(E10,1,1," "),E10&" ")&IF(LEFT(F10,1)="0",REPLACE(F10,1,1," "),F10&" ")

  18. #18
    Registered User
    Join Date
    11-22-2013
    Location
    West Midlands
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Concatenate function

    Yes but i am at work and can not upload stuff

  19. #19
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Concatenate function

    does that mean you cant download the file i uploaded?
    assume a/b/c is your data

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  20. #20
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Concatenate function

    Quote Originally Posted by humdingaling View Post
    does that mean you cant download the file i uploaded?
    I think OP was responding to post#14.

  21. #21
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Concatenate function

    shrugs..assumed if you cant upload you cant download as well so i posted my formula instead

  22. #22
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Concatenate function

    Try this tweaked version of the formula from post #8. It does not add the comma delimiter.

    =TRIM(SUBSTITUTE(SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE(
    D6&","&E6&","&F6," ","~"),","," "))," "," "),"~"," "))

+ 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. Using the CONCATENATE function nested in an IF function
    By rottweiler_lvr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-07-2013, 10:02 PM
  2. If function, then Concatenate
    By bigroo1958 in forum Excel General
    Replies: 5
    Last Post: 04-27-2011, 02:33 PM
  3. Concatenate Function
    By billykiller05 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2010, 11:29 AM
  4. CONCATENATE function
    By confu5ion in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2010, 02:35 PM
  5. Concatenate function in vba
    By camerons in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 06-14-2005, 08: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