Is there a way to Trace-Dependents in Numbers like in Excel?

I would like to find all cells which contain references to a certain sheet that I want to delete in the file. When I delete it some references get broken and I would like to know which cells in the sheet I want to delete are referenced somewhere else.


Any ideas?


I tried with Apple Script but the code I got from some other thread is somehow wrong ("if" expects "else" and not "or" which is necessary for the script to work).


Thanks in advance!

null-OTHER, macOS High Sierra (10.13.5), Numbers

Posted on Jun 6, 2018 7:54 AM

Reply
5 replies

Jun 16, 2018 7:11 AM in response to Hache1

Another quick way to achieve the results you want:

  1. First of all duplicate the file
  2. Delete the sheet in the duplicated file you intend to delete
  3. Scroll through the other sheets in the duplicated file looking for red error triangle flags
  4. Modify the references of the depending cells
  5. If you want to recreate the sheet with the same name as the deleted one, consider using the functions "INDIRECT" and/or "ADDRESS" for the broken references .


Paul.

Jun 7, 2018 8:28 PM in response to SGIII

The two processes suggested so far work from opposite ends of the stream.


Selecting the cell with the formula lets you switch back to the sheet that is to be deleted to check for any table with a highlighted cell, indicating the selected formula is directly dependent on that cell. Not great, because it does not trace the dependency back beyond that direct dependence.

User uploaded file

In the example above, the selected cell contains the formula =A2/4, and clicking on that cell reveals that it i dependent on the value in A2 of that table. But it does not reveal that the value in A2 is dependent on the value in A2 of Table 3, that the value in that cell is dependent on the value in B2 of Table 2, and that the value in that cell is dependent on the value of A2 in Table 1.


Selecting the cell you want to test for formulas that depend on it requires testing each suspect cell, but does give an indication of ALL downstream cell depending on that one. Here's the same set of tables with =1/0 (one divided by zero) entered in a cell on Table 1:

User uploaded filer]

The formula— =1/0 —is guaranteed to produce a division by zero error, as seen in the error note in the image. The rest of the error triangles flag a message that says "Cell “Table 1::B5” contains an error," which could mean that each of the flagged cells makes a direct reference to that cell, or, as in this case, directly depends on a cell who value depends (directly or indirectly) on the value in Table 1::B5.


Better, but unless you have paid attention to structure and pattern in building your tables, you'll need to check the effects of making this test entry on each of the cells in the table you intend to delete, then do a visual search for cells dependent on that value.


A script or Automater service (based on a script) seems a better choice here, even if it eliminate only the need to swap out the current contents of each cell for a formula guaranteed to produce an error, then swap in the previous contents after the user has made a visual check on the cells relying on the contents of that cell, then told the script to check the next cell. Beyond my current field, but likely within SG's, or that of one or more of the other vsitors to this community.


Regards,

Barry

Jun 16, 2018 4:15 AM in response to Hache1

Hi Hache,


Numbers will show (with colour highlighting) any cells referenced by the formula in a selected cell, but will not show which cells contain formulas referencing a selected cell.


The AppleScript you mentioned may need to be edited to work on your document. The author, or another scripter might find a more detailed description of your document useful.


Regards,

Barry

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Is there a way to Trace-Dependents in Numbers like in Excel?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.