Hi There,
I have a macro which takes the current formula in a cell and anchors each reference (makes them absolute instead of relative), the macro is as follows:
ActiveCell.Formula = Application.ConvertFormula(ActiveCell.Formula, xlA1, xlA1, xlAbsolute, ActiveCell)
This works with all the formulas I’ve used it on before, but I just ran it on the following formula:
=('UK P&L monthly'!C24+'UK P&L monthly'!C25+'UK P&L monthly'!C39+'UK P&L monthly'!C44+'UK P&L monthly'!C45+'UK P&L monthly'!C40+'UK P&L monthly'!C41+'UK P&L monthly'!C42+'UK P&L monthly'!C46)*'Balance sheet'!$F$120/SUM('Working capital'!O$4:Q$4)
(Bit of an ugly formula sorry)
For some reason the cell just became "#value" rather than replacing the formula with an anchored version-does anyone know what it is about this formula that prevents the macro working or what needs to be changed? Thanks.
T
I have a macro which takes the current formula in a cell and anchors each reference (makes them absolute instead of relative), the macro is as follows:
ActiveCell.Formula = Application.ConvertFormula(ActiveCell.Formula, xlA1, xlA1, xlAbsolute, ActiveCell)
This works with all the formulas I’ve used it on before, but I just ran it on the following formula:
=('UK P&L monthly'!C24+'UK P&L monthly'!C25+'UK P&L monthly'!C39+'UK P&L monthly'!C44+'UK P&L monthly'!C45+'UK P&L monthly'!C40+'UK P&L monthly'!C41+'UK P&L monthly'!C42+'UK P&L monthly'!C46)*'Balance sheet'!$F$120/SUM('Working capital'!O$4:Q$4)
(Bit of an ugly formula sorry)
For some reason the cell just became "#value" rather than replacing the formula with an anchored version-does anyone know what it is about this formula that prevents the macro working or what needs to be changed? Thanks.
T