You are here:

Excel/highlighting cell which is not linked to other dependent cell

Advertisement


Question
Independent Tab
Independent Tab  

Dependent Tab
Dependent Tab  
Dear Sir,

Data in the "Independent Tab" do not have any link but data in "Dependent Tab" has a link with "Independent Tab".

Currently I am trying to find the data in "Dependent Tab" (may be through hightlighting the cell or other process which donot have any linkage with "Dependent Tab").

like for example B6 of "Independent Tab" do have a linkage with "Dependent Tab" then I don't want to highlight B6 in "Independent Tab".

I can use "trace dependent" function but it is cumbersome in huge data as some time balance sheet donot tally and I am confuse which data i have not considered in calculation.

I am using excel 2007 and 2010

Regards
Rujan

Answer
Hi Rujan,

This macro selects all cells on the current sheet which have no dependent cells anywhere:

Sub HighlightNonLinked()
   Dim oRng As Range
   Dim oCell As Range
   Dim lShpCt As Long
   lShpCt = 0
   On Error Resume Next
   For Each oCell In ActiveSheet.UsedRange.Cells
       ActiveSheet.ClearArrows
       lShpCt = ActiveSheet.Shapes.Count
       oCell.ShowDependents
       If lShpCt = ActiveSheet.Shapes.Count Then
         If oRng Is Nothing Then
         Set oRng = oCell
         Else
         Set oRng = Union(oRng, oCell)
         End If
       End If
   Next
   ActiveSheet.ClearArrows
   oRng.Select
End Sub  
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Jan Karel Pieterse

Expertise

Excel and Excel/VBA questions

Experience

Excel MVP

Organizations
Self employed Excel developer

Education/Credentials
Bachelor in Chemical Engineering

Awards and Honors
Microsoft MVP award since 2002

Past/Present Clients
Shell, Fortis bank, ABN-AMRO bank, Morgan Stanley, ...

©2016 About.com. All rights reserved.