Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
HIGHLIGHT CELLS WHICH HAVE NO DEPENDENTS TO 2ND WORKSHEET
I'm the Rick who posted that... and if worked back then. I'd like to take a
look at your files, but I'm using a newsgroup reader (if that is the reason) and cannot see any attachments. It would be best if you could post them to one of the free sites that allow that so I and others can try to solve your problem. You can also send them to me directly if you would like... just remove the NO.SPAM stuff from my email address before you try to send them. Just so you know, it is 4:00am here and I'm about to go to sleep for the night, so you won't here back from me for a little while. If you post the attachments to one of those free sites out there, someone may be able to give you an answer sooner than I will be able to. -- Rick (MVP - Excel) "Ali" wrote in message ... Dear Rick AND ALL, The reply you posted at this link http://www.microsoft.com/office/comm...xp=&sloc=en-us on August 17, 2008 as follows: It took a little studying to figure out what was going on (Tom's post about removing the arrows put me on what I think was the right track). Give this macro a try; I think it will do what you want... Sub SelectNonDependentCellsInSelection() Dim ShapeCount As Long Dim R As Range Dim NonDependents As Range ActiveSheet.ClearArrows ShapeCount = ActiveSheet.Shapes.Count For Each R In Selection R.ShowDependents If ActiveSheet.Shapes.Count = ShapeCount Then If NonDependents Is Nothing Then Set NonDependents = R Else Set NonDependents = Union(R, NonDependents) End If End If ActiveSheet.ClearArrows Next NonDependents.Select End Sub Rick EXCEL FILE ATTACHED FOR YOUR PROPER UNDERSTANDING AND SOLUTION. ATTACHED FILE HAVE TWO SHEETS. Data imported and pasted in the first worksheet named as Data-3 for accounts. Data in this work linked with the worksheet named as "Audit Accounts". I want to trace or highlight those cells which have not linked or have no dependents at Audit accounts worksheet. I paste this code in the VBA module and run macro but it is not highlighting the cells which have no dependents to the worksheet no. 2 named as "Audit Accounts". A message box appears which shows (Object variable or with block variable not set). Firstly, I want code work properly then only highlight those cells which have no dependents to "Audit Account" worksheet because each cell have multiple dependents at a time. Request to hear you soon for positive response. Ali |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I highlight cells in a worksheet having a particular value? | Excel Worksheet Functions | |||
highlight cells that have dependents | Excel Discussion (Misc queries) | |||
How do I highlight cells on a worksheet that contain formulas | Excel Worksheet Functions | |||
how do trace dependents for all cells at once? | Excel Discussion (Misc queries) | |||
Dependents on another worksheet | Excel Programming |