+ Reply to Thread
Results 1 to 14 of 14

Trouble Trimming and Concatenating

  1. #1
    Registered User
    Join Date
    08-21-2014
    Location
    Farifax, VA
    MS-Off Ver
    Windows 7
    Posts
    36

    Trouble Trimming and Concatenating

    I have been using the same formulas, but this time they are not working. I wanted to make sure that the name fields are trimmed and then concatenate the last name, space, first name into a field for comparison. I've attached an example of the problem.
    Attached Files Attached Files

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

    Re: Trouble Trimming and Concatenating

    The cells are formatted as text.

    Change the format to General then re-enter the formulas.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    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: Trouble Trimming and Concatenating

    You can do it in one formula

    =CONCATENATE(TRIM(B2)," ",TRIM(C2))
    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

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

    Re: Trouble Trimming and Concatenating

    Quote Originally Posted by alkey View Post
    you can do it in one formula

    =concatenate(trim(b2)," ",trim(c2))
    Here's another one...

    =TRIM(B2)&" "&TRIM(C2)
    Last edited by Tony Valko; 09-22-2014 at 10:12 AM.

  5. #5
    Registered User
    Join Date
    08-21-2014
    Location
    Farifax, VA
    MS-Off Ver
    Windows 7
    Posts
    36

    Re: Trouble Trimming and Concatenating

    The cell still shows the formula and not the result. I've attached the file again with the formula.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,082

    Re: Trouble Trimming and Concatenating

    Try

    =TRIM(B2)&" "&(TRIM(C2))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  7. #7
    Registered User
    Join Date
    08-21-2014
    Location
    Farifax, VA
    MS-Off Ver
    Windows 7
    Posts
    36

    Re: Trouble Trimming and Concatenating

    No, just the formula shows in the cell instead of the names.

  8. #8
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,082

    Re: Trouble Trimming and Concatenating

    Press Ctrl-'

  9. #9
    Registered User
    Join Date
    08-21-2014
    Location
    Farifax, VA
    MS-Off Ver
    Windows 7
    Posts
    36

    Re: Trouble Trimming and Concatenating

    I'm not sure what you mean. While I'm in the cell, press the CTRL and the single apostrophe key?

  10. #10
    Registered User
    Join Date
    08-21-2014
    Location
    Farifax, VA
    MS-Off Ver
    Windows 7
    Posts
    36

    Re: Trouble Trimming and Concatenating

    That doesn't work. It copies the title to that cell.

  11. #11
    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: Trouble Trimming and Concatenating

    Quote Originally Posted by chcalissie View Post
    That doesn't work. It copies the title to that cell.
    Please see attached file
    Attached Files Attached Files

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Trouble Trimming and Concatenating

    read post #2
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  13. #13
    Registered User
    Join Date
    08-21-2014
    Location
    Farifax, VA
    MS-Off Ver
    Windows 7
    Posts
    36

    Re: Trouble Trimming and Concatenating

    I looked at your formula and entered it in my spreadsheet and the formula is still the only thing that shows. I tried to copy it from one spreadsheet to the other,but I wasn't sure what to select - like binary format, etc., so it only copied the name.

  14. #14
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Trouble Trimming and Concatenating

    still the same? have you done what is said in post #2

+ 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. [SOLVED] Concatenating two columns and reversing after concatenating the result
    By irfanparbatani in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-22-2014, 09:35 PM
  2. Excel 2007 : Trimming of URL
    By david106 in forum Excel General
    Replies: 2
    Last Post: 04-23-2012, 09:27 AM
  3. Replies: 5
    Last Post: 08-12-2011, 02:33 PM
  4. trimming
    By RobcPettit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2006, 03:25 PM
  5. IP Trimming
    By Josh in forum Excel General
    Replies: 1
    Last Post: 06-16-2006, 11:40 AM

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