Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Trim function

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have some cells that look like this after using the concatenate function:
    101-P T -200
    102-L T -201
    103-MOV-202

    What I'm trying to do is get all the cells to display the tags with no spaces in them (like the MOV tag). I tried using the TRIM function but it leaves one space between the letters. Is there something similar to TRIM that would take all of the spaces out?

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    See the Help topic for the SUBSTITUTE worksheet function.

    Hint: change " " to "".

  3. #3
    MrExcel MVP
    Colo's Avatar
    Join Date
    Mar 2002
    Location
    Kobe, Japan
    Posts
    1,456
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)

    Default

    Hi Mr. Guy,
    The answer is see columns "G" of following.
    Microsoft Excel - Trim function.xls
    File(F) Edit(E) View(V) Insert(I) Tool(T) Data(D) Window(W) Help(H)
    G4==SUBSTITUTE(F4," ","")
    ABCDEFG
    1 Answer is
    2101-P T -200=CONCATENATE(A2,B2,C2,D2,E2)=SUBSTITUTE(F2," ","")
    3102-L T-201=CONCATENATE(A3,B3,C3,D3,E3)=SUBSTITUTE(F3," ","")
    4103-MOV-202=CONCATENATE(A4,B4,C4,D4,E4)=SUBSTITUTE(F4," ","")


    Hope this helps + pen pineapple apple pen!

    Masaru Kaji aka Colo - cellmasters.net

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •