+ Reply to Thread
Results 1 to 5 of 5

Loop through the results of Find / Add Hyperlink to all cells containing certain text

  1. #1
    Registered User
    Join Date
    02-24-2010
    Location
    Catalonia
    MS-Off Ver
    Excel 2002
    Posts
    13

    Loop through the results of Find / Add Hyperlink to all cells containing certain text

    Hi there,

    I was wondering if there is anyway to add a certain hyperlink to all cells where the entire cell contents match a certain value.

    I know how to do this by looping through all sheets and cells, but my workbook has over 60 sheets and there are over 70 different values of cell contents that should have hyperlinks. Therefore I'm wondering if there is any quicker way.

    One way I thought of was to do a find and replace the value with the hyperlink formula, but I am not able to do this. The text must remain the same in the cells.

    Is there any way of looping through all the results of a find and gettting the address of each one?

    Thanks in advance for any suggestions on how to complete this tricky task!

    js
    Last edited by js8765; 04-13-2010 at 09:55 AM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Loop through the results of Find / Add Hyperlink to all cells containing certain

    Attach a small sample workbook including desired results, and somebody will help.

  3. #3
    Registered User
    Join Date
    02-24-2010
    Location
    Catalonia
    MS-Off Ver
    Excel 2002
    Posts
    13

    Re: Loop through the results of Find / Add Hyperlink to all cells containing certain

    Hi,

    So, here's the sample workbook.

    As you can see, there is a sheet called "XYZ" and throughout the workbook there are cells whose entire contents are "XYZ". Everywhere I have such a cell, I would like a link placed to the sheet "XYZ" (like in Sheet1!B2)

    The contraints are:
    - I cannot use the formula "=Hyperlink(x,y)" in the cell and
    - I would prefer not to have to loop through all cells in all sheets to find occurences of "XYZ" as the real workbook is huge and there I would have to loop through the entire workbook 40+ times to look for 40 different worksheet names.

    I hope I've managed to explain this a bit better. Make sure to let me know if you want any more information.

    Thanks again,

    js
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Loop through the results of Find / Add Hyperlink to all cells containing certain

    This does XYZ, but if you multiple sheets, I think another loop would have to be built in to the code.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-24-2010
    Location
    Catalonia
    MS-Off Ver
    Excel 2002
    Posts
    13

    Re: Loop through the results of Find / Add Hyperlink to all cells containing certain

    That's exacly what I was looking for.

    Excellent reply.

    Thanks very much!

+ 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