Sub find_links()
    Dim extlinks
    Dim j As Long, k As Long
    Dim wkb As Workbook
    Dim rng As Range, cl As Range
    Dim links1 As String
    Dim wk As Worksheet
    Set wkb = Workbooks.Add
    wkb.Sheets(1).Range("a1").Value = "Sheet Name"
    wkb.Sheets(1).Range("b1").Value = "Cell Address"
    wkb.Sheets(1).Range("c1").Value = "Formula"
    wkb.Sheets(1).Range("d1").Value = "External Link"
    k = 2
    extlinks = ThisWorkbook.LinkSources(xlExcelLinks)

    For Each wk In ThisWorkbook.Sheets
        On Error Resume Next
        Set rng = wk.UsedRange.SpecialCells(xlCellTypeFormulas)

            If Not rng Is Nothing Then
            For j = LBound(extlinks) To UBound(extlinks)
            links1 = Left(extlinks(j), InStrRev(extlinks(j), "\")) & "[" &
Right(extlinks(j), Len(extlinks(j)) - InStrRev(extlinks(j), "\"))
            MsgBox links1
                For Each cl In rng
                    If InStr(" " & cl.Formula, links1) > 0 Then
                    wkb.Sheets(1).Range("a" & k).Value = wk.Name
                    wkb.Sheets(1).Range("b" & k).Value = cl.Address
                    wkb.Sheets(1).Range("c" & k).Value = "'" & cl.Formula
                    wkb.Sheets(1).Range("d" & k).Value = extlinks(j)
                    k = k + 1
                    End If
                Next
            Next
        End If
        Err.Clear
        Set rng = Nothing
    Next
End Sub



On Wed, Apr 2, 2014 at 4:10 PM, Ashish Bhalara <ashishbhalar...@gmail.com>wrote:

>
>
> ---------- Forwarded message ----------
> From: Ashish Bhalara <ashishbhalar...@gmail.com>
> Date: Tue, Apr 1, 2014 at 1:23 PM
> Subject: $$Excel-Macros$$ Show links which to other Data source
> To: "excel-macros@googlegroups com" <excel-macros@googlegroups.com>
>
>
> Dear experts,
>
> My workbook containing large no. of sheets & formulas, but I want to show
> those formulas which containing links to other data source of file. Kindly
> know me how to check it.
>
> --
> Regards.
> Ashish Bhalara
> 9624111822
> P*Please do not print this email unless it is absolutely necessary.
> Spread environmental üawareness.♣♣♣*
>
>  --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Regards.
> Ashish Bhalara
> 9624111822
> P*Please do not print this email unless it is absolutely necessary.
> Spread environmental üawareness.♣♣♣*
>
>  --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Regards*

*Ashish Koul*


*Visit*
http://www.excelvbamacros.in
Like Us on 
Facebook<http://www.facebook.com/pages/Excel-VBA-Codes-Macros/151803898222297>
Join Us on Facebook <http://www.facebook.com/groups/163491717053198/>


P Before printing, think about the environment.

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to