Tracing Cell Precedents in VBA (Finding formulae t

  • I want to be able to determine if a particular cell has precedents on another sheet, or in another workbook. I had hoped to use .Precedents and do something like comparing "testCell.Precedents.Count" with "Intersect(Cells,testCell.Precedents).Count", or looking for "!" in testCell.Precedents.Address.


    However the .Precedents range only contains precedents on the same sheet, so this doesn't work. I have tried a couple of other tricks but so far can't find a catch-all workaround, (mainly because I some of the formula reference named cells on other sheets).


    Any help would be greatly appreciated, Dzinja.

  • Hi Dzinja,


    Try this routine,


    Cheers
    Andy

    [h4]Cheers
    Andy
    [/h4]

  • As it happens there is a much easier way to do what I was trying to do which side-steps needing to know the precedents. However, it is good to know in case I need it in future.


    Many thanks, Dzinja

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!