+ Reply to Thread
Results 1 to 5 of 5

Revise formula to remove sapces from text in another cell

  1. #1
    Registered User
    Join Date
    11-08-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    32

    Revise formula to remove sapces from text in another cell

    I have this formula now:
    =HYPERLINK("http://www.domain.com/pics/"&LOWER(SUBSTITUTE(C916,"-",""))&".jpg")

    Where C916 is a term such as Apple and it creates the hyperlink www.domain.com/pics/apple.jpg

    Now i want it to take a term with spaces and do the same thing but remove the spaces. So if C916 is Apple 123 456, i want the hyperlink created to be www.domain.com/pics/apple123456.jpg

    There may be more than 1 space in the cell and it may be in different locations. Can this be done?

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Revise formula to remove sapces from text in another cell

    Substitute(C916, " ", "") will remove all the spaces
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    11-08-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: Revise formula to remove sapces from text in another cell

    thanks, can you show me how to combine both the hyphen removal and the space removal into 1 formula?

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Revise formula to remove sapces from text in another cell

    =HYPERLINK("http://www.domain.com/pics/"&LOWER(SUBSTITUTE(Substitute(C916, " ", ""),"-",""))&".jpg")

  5. #5
    Registered User
    Join Date
    11-08-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: Revise formula to remove sapces from text in another cell

    thanks a lot

+ 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. to remove duplicate text within a cell using formula.
    By tell_arshad in forum Excel General
    Replies: 4
    Last Post: 03-10-2015, 04:38 AM
  2. [SOLVED] Need to revise a formula based on content of a cell
    By mikerules in forum Excel General
    Replies: 17
    Last Post: 03-22-2014, 02:16 AM
  3. Replies: 6
    Last Post: 03-03-2014, 02:28 PM
  4. Formula to remove text from a cell
    By Backroomgeeza in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-18-2013, 02:40 PM
  5. Help needed to revise a formula
    By stevecricket in forum Excel General
    Replies: 2
    Last Post: 05-01-2012, 11:20 AM
  6. How to revise average formula
    By conks in forum Excel General
    Replies: 3
    Last Post: 12-06-2010, 07:46 AM
  7. Need to revise formula
    By Jack in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-10-2006, 09:30 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