+ Reply to Thread
Results 1 to 8 of 8

Convert cells to links

  1. #1
    Registered User
    Join Date
    02-16-2011
    Location
    US,US
    MS-Off Ver
    Excel 2007
    Posts
    8

    Convert cells to links

    I have a bunch of plain text cells pointing to different spreadsheets i.e. a cell could have 'D:\Me\Jan-11\[myfile1.xlsx]Sheet1'!$G$64. I actually created this string through the concatenate function, but then got stuck. I can copy and paste the value of cell (concatenate(a1,a2,a3)) into a new cell. But is there a way that I can actually after the paste add = to it and hit enter so that it retrieves the value?

    So for example, I can take cell with this 'D:\Me\Jan-11\[myfile1.xlsx]Sheet1'!$G$64 make this ='D:\Me\Jan-11\[myfile1.xlsx]Sheet1'!$G$64 and click enter for each cell?

    I have a bunch of these cells and the strings are dynamic and subject to change, so I'm looking for a way to automate this.

    Any help is greatly appreciated.
    Last edited by vbhal; 02-25-2011 at 09:57 AM.

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

    Re: Convert cells to links

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    I assume a Hyperlink formula can be used

  3. #3
    Registered User
    Join Date
    02-16-2011
    Location
    US,US
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Convert cells to links

    Thanks Dave I can see that my explanation was confusing. As you can see in the uploaded spreadsheet, I just would like Cell D5 to pull the value that it the path name is pointing too. I couldn't think of a way to do it either in Excel or VBA. Any help is appreciated.
    Attached Files Attached Files

  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: Convert cells to links

    Try this macro:
    Please Login or Register  to view this content.
    _________________
    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!)

  5. #5
    Registered User
    Join Date
    02-16-2011
    Location
    US,US
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Convert cells to links

    Fantastic, thanks taking the time to help! Really appreciated

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

    Re: Convert cells to links

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  7. #7
    Registered User
    Join Date
    02-16-2011
    Location
    US,US
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Convert cells to links

    Thanks so much, I was going to mark this but then tried to put this in a function

    For example I used:

    Function MakeFormulas(RNG As Range) as Range
    MakeFormulas.Formula = "=" & RNG.Text
    End Function

    And I keep getting #Values, apologies as I know this is probably a basic question as I haven't written functions before and am a complete beginner to VBA syntax. Is it that I can't use the .formula here in the function?

    Thanks again

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

    Re: Convert cells to links

    This won't work as a function.

+ 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