+ Reply to Thread
Results 1 to 3 of 3

Copy links from one sheet to another

  1. #1
    Registered User
    Join Date
    01-29-2012
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    18

    Question Copy links from one sheet to another

    Problem Example.xlsx

    Hi Experts,
    I am new to excel forum ad this is my first post.
    I have 2 sheets- Sheet 1 and Links Sheet
    I have some items in Sheet 1 in column B and C.
    Second links sheet contains links to Images.
    The link contains the last code of Item same for eg IMG_0365.JPG

    I want the link present in the second sheet gets copied to same coded
    Item in sheet 1 in column D

    Please find the attached excel file and help me out guys and all expert members.
    Thanks.
    Last edited by Yogi28; 01-29-2012 at 09:48 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy links from one sheet to another

    You can actually extract the "JPG" string from the B:C columns and retrieve the hyperlink using just a formula, put this in D2 and copy down... some values won't work, but the rows D11:D17 will at first:

    =HYPERLINK(INDEX(Links!B:B,MATCH("*"&MID(B2,FIND("IMG",B2),FIND("JPG",B2)+4-FIND("IMG",B2))&"*",Links!$B:$B,0)),"Link")


    Now, we can use an IFERROR() to make it switch to column C when an error occurs column B:


    =IFERROR(HYPERLINK(INDEX(Links!B:B,MATCH("*"&MID(B2,FIND("IMG",B2),FIND("JPG",B2)+4-FIND("IMG",B2))&"*",Links!$B:$B,0)),"Link"), HYPERLINK(INDEX(Links!C:C, MATCH("*" & MID(C2, FIND("IMG", C2), FIND("JPG", C2)+4-FIND("IMG", C2)) & "*", Links!$B:$B, 0)), "Link"))
    Last edited by JBeaucaire; 01-31-2012 at 01:39 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-29-2012
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: Copy links from one sheet to another

    Thanks a lot Mr JBeaucaire for great help!

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy links from one sheet to another

    URLs are notoriously ugly, so I use the word "Link" for the display, neat and preferable to the average user. But there are time you as the designer might want to see the URL... just remove the LINK (and the comma preceding) and the cell will display the URL itself.

    (underlined above in the original post)

+ 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