+ Reply to Thread
Results 1 to 2 of 2

Check Hyperlink and use it in a function

  1. #1
    Registered User
    Join Date
    08-11-2017
    Location
    Germany
    MS-Off Ver
    2010, 2016
    Posts
    2

    Check Hyperlink and use it in a function

    Hello everyone,

    I am having problems optimizing some Excelsheets.

    Usually we have a big sheet that logs inputs in a lot of different files, which are all formated the same.
    All functions are pointed to a document (12 per line) and on the end is a hyperlink to the document. Then a numerical value is taken from there.
    Everytime we reuse this ALL links have to be updated.
    My idea is that instead I just check the field containing my hyperlink and let the functions work with that so I only have to update the hyperlinks.

    ==========================================================================================

    Usual functions look like this:

    =IF($T11<>"y";"-";'\\Link\to\document'!Field)

    ==========================================================================================

    So far I´ve got this for vba:



    Function GetURL(cell As Range, _
    Optional default_value As Variant)
    If (cell.Range("A1").Hyperlinks.Count <> 1) Then
    GetURL = default_value
    Else
    GetURL = cell.Range("A1").Hyperlinks(1).Address
    '& "#" & cell.Range("A1").Hyperlinks(1).Subaddress
    End If
    End Function


    ==========================================================================================

    My idea was to just do it like this:

    =IF($T11<>"y";"-";getURL(U11; "Field"))

    or

    =IF($T11<>"y";"-";getURL(U11!Field))


    Both just return the Link that the Hyperlinks points to instead of reading the desired value. Now I´m out of ideas.

    I would really appreciate it if someone knew how to get this working since it would save a lot of people a lot of time.



    Thank you and best regards,

    Oliver

  2. #2
    Registered User
    Join Date
    08-11-2017
    Location
    Germany
    MS-Off Ver
    2010, 2016
    Posts
    2

    Re: Check Hyperlink and use it in a function

    Anyone????

+ 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. [SOLVED] Excel 2010 Create a macro to check if cell contains hyperlink then apply hyperlink style
    By chasidar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2013, 04:48 AM
  2. hyperlink with check box
    By kuzna26 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-04-2013, 11:39 AM
  3. Replies: 20
    Last Post: 03-19-2011, 09:13 AM
  4. Check box that disables a hyperlink?
    By Elegidos in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 10-16-2009, 04:09 AM
  5. How to check if cell has a hyperlink or not.
    By FNR in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-06-2007, 11:52 PM
  6. How do I create a hyperlink to a cell with the hyperlink function
    By S. Bevins in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-20-2006, 03:06 PM
  7. [SOLVED] Check for Hyperlink
    By Mike Fogleman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2005, 07:05 PM
  8. Replies: 3
    Last Post: 05-06-2005, 01:06 AM

Tags for this Thread

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