Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Oct 2003
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Esay way to Trace Dependents? (Excel 2003)

    anybody? please.

  2. #2
    Star Lounger
    Join Date
    Oct 2003
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Esay way to Trace Dependents? (Excel 2003)

    Post deleted by aluislugo

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Esay way to Trace Dependents? (Excel 2003)

    Be patient, please! Everyone here is a volunteer, and many of us have other things to keep us busy besides Woody's Lounge (a job, a family, ...)

  4. #4
    Star Lounger
    Join Date
    Oct 2003
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Easy way to Trace Dependents? (Excel 2003)

    I have a spread sheet with 10 columns and 1000 rows for a total of 10,000 cells. Of that 10,000 there are about 2000 cells randomly scattered that I would like to check for dependents and then delete if there no dependents. The problem is checking 2,000 cells individually and then deleting. Is there a way I can highlight just the 2,000 cells at once and then have Excel check if they are dependent. If there are not then delete, otherwise if they are dependent then do not delete. Thank you.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Easy way to Trace Dependents? (Excel 2003)

    Isn't that dangerous? You'd delete all the end results of calculations, because the end result has no dependents...

  6. #6
    Star Lounger
    Join Date
    Oct 2003
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Easy way to Trace Dependents? (Excel 2003)

    No that's the objective. I am trying to delete the select cells that are NOT linked to other sheets in the workbook but first I need to determine if they are dependent elsewhere in the workbook.

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Easy way to Trace Dependents? (Excel 2003)

    I'm not sure whether you want to find cells without precedents or cells without dependents. If the following macro doesn't do what you want, replace Dependents with Precedents and try again.

    Sub TestForDependents()
    Dim oCell As Range
    Dim lngCount As Long
    Dim lngSelected As Long
    On Error Resume Next
    For Each oCell In Range("A1:K1000")
    lngCount = oCell.Dependents.Count
    If Err Then
    If lngSelected = 0 Then
    oCell.Select
    Else
    Union(Selection, oCell).Select
    End If
    lngSelected = lngSelected + 1
    End If
    Err.Clear
    Next oCell
    MsgBox lngSelected & " cells selected", vbInformation
    End Sub

    The macro doesn't modify cells, it just selects a bunch of cells. You can then delete their contents by pressing Delete, or highlight them by changing their fill color, or whatever you like.

  8. The Following User Says Thank You to HansV For This Useful Post:

    mrlovat (2013-08-15)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •