View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Bash Dave Bash is offline
external usenet poster
 
Posts: 11
Default Finding referenced worksheets used in a worksheet

I know how to find external workbook links - is there a VBA function
or perhaps someone has written code to find external worksheet
references to a given sheet from other sheets in the workbook.

Here's what I mean:

sheet1 has some formulas in various cells. Some of these pull in
values from sheet2 and sheet3. My first inclination is to scan
through all the formulas in sheet1's UsedRange using the instr
function and look for the ! which would have to appear after the
reference to an external sheet. I then would need to do quite a bit
of parsing to first establish the sheet name ( my thought was a loop
of all sheet names used in instr function until I get a value 0 on
the string between the beginning of the string and the ! ). Next I
would have to search the remaining string, exhaustively, with the same
process to account for multiple occurences of external references. If
I also want to capture the range after the ! there would be even more
parsing to the right.

I appreciate any help that would make this easier.

Thanks All.