+ Reply to Thread
Results 1 to 5 of 5

search find replace substutute

Hybrid View

  1. #1
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    search find replace substutute

    Hi guys,

    If anyone can suggest a better thread tittle please let me know.

    I have attached a sample showing the desired result which will make this easier to follow.

    In cell B2 there is a hyperlink which I have copied and pasted, the url pertains to a particular web page for the value in cell A2.

    I would like a formula to save me time from going to each web page from the values listed in col A and copying and pasting the URL.

    Therefore, in B3 I would like a formula which copies everything in the URL above (B2) from the first h until the first = sign as below:-

    http://www.caravanclub.co.uk/Caravan...ult.aspx?site=

    and then inserts the value in col b (and this is where i am struggling as, there needs to be + signs between the words, For eg B3 should be inserted as

    Blackmore +Caravan+Club+Site

    and then the last part of the url which in the case above is (and wil always be &arrivalDate=16/09/2011&departureDate=19/09/2011

    So, as an eg B3 should say

    http://www.caravanclub.co.uk/Caravan...site=Blackmore +Caravan+ Club+ Site&arrivalDate=16/09/2011&departureDate=19/09/2011

    My way would be to create 3 helper cols and use the len function for the two parts of the hyperlink and the third cell adding the contents of col A but inserting a + in the blanks and THEN in B joining the lot together.

    But this seems a bit long winded - can anyone suggest something better?

    Thanks for looking
    Attached Files Attached Files
    Last edited by Blake 7; 09-18-2011 at 09:47 AM.
    Blake 7

    If your question has been answered, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

    If any member's response has helped to solve your problem, please consider using the scales icon on the top right of their post to show your appreciation.

    http://failblog.org/

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

    Re: search find replace substutute

    how about
    =HYPERLINK($D$5&SUBSTITUTE(A2," ","+")&$D$6)
    or even
    =HYPERLINK($D$5&SUBSTITUTE(A2," ","+")&$D$6,A2)
    or even
    =HYPERLINK(LEFT($B$2,(94))&SUBSTITUTE(A2," ","+")&RIGHT($B$2,(48)),A2)
    Last edited by martindwilson; 09-18-2011 at 09:29 AM.
    "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

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: search find replace substutute

    Well, you jusdt named bunch of function. I think you should be more focused on your problem: How to create hyperlink from a text

    Maybe this?

    =HYPERLINK("http://www.caravanclub.co.uk/CaravanClubApps/Applications/UK%20Sites/CalendarResult.aspx?site="&
    SUBSTITUTE(A3," ","+")&"&arrivalDate=16/09/2011&departureDate=19/09/2011")
    Never use Merged Cells in Excel

  4. #4
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: search find replace substutute

    Hi Martin / Zbor - thanks both for your suggestions. I'll try them out now and report back. Hope that you are both well. How's that beautiful bbq of yours Z?

  5. #5
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: search find replace substutute

    holy smoke guys - wow. top stuff. all suggestions worked a treat. SOLVED

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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