+ Reply to Thread
Results 1 to 8 of 8

how to add dashes between words in a cell

  1. #1
    Registered User
    Join Date
    02-09-2011
    Location
    Miami, FL
    MS-Off Ver
    Excel 2007
    Posts
    2

    Wink how to add dashes between words in a cell

    Hello everyone.

    I am new to this forum and not an excel genius at all but I can manage

    I have a formula that now looks like this:
    2XU Super Elite Endurance Trisuit 2011-2X1769

    And I want it to look like this:
    2XU-Super-Elite-Endurance-Trisuit-2011-2X1769

    Is there a formula I can use to add dashes between the words in the same cell?

    Thanks

  2. #2
    Registered User
    Join Date
    02-09-2011
    Location
    Miami, FL
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: how to add dashes between words in a cell

    Never mind... i just thought of it... "find & replace".... can you say duh? thanks anyway.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: how to add dashes between words in a cell

    Hello,
    Not sure what you are talking about, what you have displayed is not a formula, I can only asume you are trying to cocatenate a bunch of cells into one cell.

    Try,

    =a1&"-"&b1&"-"&c1&"-"d1

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: how to add dashes between words in a cell

    =SUBSTITUTE(formula," ","-")

    where

    formula

    is whatever formula you have now to produce your current results.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: how to add dashes between words in a cell

    As a matter of interest

    Try this in a spare column say B2 with 2XU Super Elite Endurance Trisuit 2011-2X1769 in A2

    =SUBSTITUTE(A2," ","-")

    Drag/Fill Down

    Of course if Find/Replace does the job use it!
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  6. #6
    Registered User
    Join Date
    11-09-2015
    Location
    louisiana
    MS-Off Ver
    2013
    Posts
    1

    Re: how to add dashes between words in a cell

    did anyone figure out how to do this. I need to put dashes between the words; instead of spaces.

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: how to add dashes between words in a cell

    Quote Originally Posted by naughtyboytoyz View Post
    did anyone figure out how to do this. I need to put dashes between the words; instead of spaces.
    Yes, see the posts above for the answers.

  8. #8
    Registered User
    Join Date
    11-14-2018
    Location
    India
    MS-Off Ver
    2010
    Posts
    1

    Re: how to add dashes between words in a cell

    Quote Originally Posted by 6StringJazzer View Post
    =SUBSTITUTE(formula," ","-")

    where

    formula

    is whatever formula you have now to produce your current results.
    WOW thanks for this simple formula.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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