View Single Post
 
Old 07-15-2023, 09:37 AM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2021
Expert
 
Join Date: Apr 2014
Posts: 948
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

When you use DirectPrecedents one of the areas is the area you use in the Name inflation, that is the (if you're in column O):
INDEX(Sheet1!O$1:Sheet1!O$2…
rather than the single cell result of that name, O2 on its own.


You can get to it with
.NavigateArrow TowardPrecedent:=True, ArrowNumber:=5, LinkNumber:=1
but you need to work out the arrownumber and linknumber. Good luck with that!
It all gets very complicated; see:
Excel VBA code to trace precedents of cell - Stack Overflow
vba - Programmatically select other sheet precedents or dependents in Excel - Stack Overflow
When called from an Excel VBA UDF, Range.Precedents returns the range and not its precedents. Is there a workaround? - Stack Overflow



Why do you want to do this?
Reply With Quote