Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I can't get the following function to return the direct dependents
Function ResolveFormula(ByRef rngCell As Range, iColLabels As Integer) As String Dim sCell As String Dim rngPrec As Range sCell = rngCell.Formula For Each rngPrec In rngCell.DirectPrecedents With rngPrec sCell = Replace(sCell, rngPrec.Address(False, False, xlA1), _ .Offset(0, iColLabels - .Column + 1).Value) End With Next rngPrec ResolveFormula = sCell End Function For the worksheet A 1 B 2 =B1 * B2 =ResolveFormula(B3, 1) to give =A * B TIA Kevin Beckham |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
DirectDependents not working properly. | Excel Programming | |||
What's the difference between .Dependents and .DirectDependents? | Excel Programming | |||
Finding when there are no directdependents | Excel Programming | |||
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? | Excel Programming |