You are here:

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


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


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
       lShpCt = ActiveSheet.Shapes.Count
       If lShpCt = ActiveSheet.Shapes.Count Then
         If oRng Is Nothing Then
         Set oRng = oCell
         Set oRng = Union(oRng, oCell)
         End If
       End If
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


All Answers

Answers by Expert:

Ask Experts


Jan Karel Pieterse


Excel and Excel/VBA questions


Excel MVP

Self employed Excel developer

Bachelor in Chemical Engineering

Awards and Honors
Microsoft MVP award since 2002

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

©2017 All rights reserved.