+ Reply to Thread
Results 1 to 5 of 5

Space between text and dash

  1. #1
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    Space between text and dash

    Hello,

    I have a spreadsheet that has rows contain text and dash such as tcu - OU. These spaces between dash and text are not consistent, some of them have double space in between and they are very hard to look. Is there a way that I can make them consistent by having one space in between and no space at the end?

    Thanks

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Space between text and dash

    hi tantcu. TRIM would remove preceding, trailing spaces & maintain 1 space between each character. so
    =TRIM(A1)
    copy down

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  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: Space between text and dash

    You can use =TRIM function to remove double spaces and trailing spaces and spaces in the beginning of the string.
    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 Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Space between text and dash

    Hi,

    If you mean that a cell might have
    "tcu - OU"
    ,
    PHP Code: 
    "tcu   -  OU 
    ", etc. then try

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

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.95 for Mac MS 365
    Posts
    8,682

    Re: Space between text and dash

    I would think the easiest way would be a find and replace. Find __-_ and replace with _-_ where the underscore represents the space.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

+ 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. Batch Change .JPG File name: space with a dash
    By vargs in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-27-2013, 02:17 AM
  2. VBA code-file name replace dash with space
    By vargs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2010, 03:22 PM
  3. [SOLVED] Nw how do i extract text from a text seperated by a dash.
    By all4excel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-26-2007, 05:30 AM
  4. Text after a dash
    By Steve in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-25-2006, 11:10 PM
  5. understanding dash dash in a excel formula
    By ldebner in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-31-2005, 10:05 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