Re: Dependents of a formula

Tech-Archive recommends: Fix windows errors by optimizing your registry



"Bob" <someonw@xxxxxx> wrote in message
news:%23AQz82fCJHA.2476@xxxxxxxxxxxxxxxxxxxxxxx
Hi Everyone:

In excel VBA, is there a way to get the cell references that a formula
contains. For example, if in cell A1, I have the following formula:

=2*B1+C3-x

where x is a defined name (referencing cell D5).

So, for cell A1, I want the program to return to me B1, C3, and x (or
D5).

I would appreciate a small code for this. Thanks for all your help.

Bob



I've never used this, but look at the Excel VBA help on DirectDependents

varMyTemp = Range("A1").DirectDependents.Address

might do what you want.


--
Clif
Still learning Access 2003




.



Relevant Pages

  • Dependents of a formula
    ... In excel VBA, is there a way to get the cell references that a formula ... Bob ...
    (microsoft.public.office.developer.vba)
  • Re: For Each statement
    ... See the excel VBA help on the findnext method. ... how to do this for values in a cell. ... > quickest way and provide the syntax to do the above. ...
    (microsoft.public.excel.programming)
  • Re: formulas in Word
    ... lose any assigned bookmark names. ... it doesn't adjust the formulas like Excel does! ... on the cell, going to edit field, clicking on Formula and then changing ... the cell references to suit the new rows. ...
    (microsoft.public.word.docmanagement)
  • Re: Finding Matching Symbols in 2 Columns
    ... cell references like A1, The column reference A is ignored. ... That is being used as a pseudo error trap. ... Index takes a range, row num, column num as parameters. ...
    (microsoft.public.excel.worksheet.functions)
  • Stepping through cells
    ... New to the world of Excel VBA programming. ... Row 2 is a Text ID row (will always have a string value) ... Basically need to parse through the spreadsheet and where the cells in rows ... the Excel VBA cell references and calls is totally unfamiliar. ...
    (microsoft.public.excel.programming)