ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ConvertFormula Problem (https://www.excelbanter.com/excel-programming/325528-convertformula-problem.html)

Ant Bewes

ConvertFormula Problem
 
I am unable to convert the following cell's formula:

"='Standard Model'!E34+'Standard Model'!E36+'Standard
Model'!E37+'Standard Model'!E38+'Standard Model'!E39+'Standard
Model'!E32+'Standard Model'!E41"

The cell is 'A1' in 'Standard Model' worksheet 'MyWorkbook.xls'
workbook

I am using:

Application.ConvertFormula(ActiveCell.FormulaR1C1, xlR1C1,xlA1,true,ActiveCell)

I get variant "Error 2015" back.

I *think* this is due to ConvertFormula appending the workbook name to
each reference internally and exceeding some string size limitation?

Are there any workarounds for this - I am using the ConvertFormula in
this way to standardise any formula to a $A$1 type. This is in
preparation for tokenising the references based on the $'s.

Any help would be appreciated,

Ant

Don Guillett[_4_]

ConvertFormula Problem
 
I have never used this but tryActiveCell.FormulaorFormula Required Variant.
A string that contains the formula you want to convert. This must be a valid
formula, and it must begin with an equal signDon GuillettSalesAid
"Ant Bewes" wrote in message
om...
I am unable to convert the following cell's formula:

"='Standard Model'!E34+'Standard Model'!E36+'Standard
Model'!E37+'Standard Model'!E38+'Standard Model'!E39+'Standard
Model'!E32+'Standard Model'!E41"

The cell is 'A1' in 'Standard Model' worksheet 'MyWorkbook.xls'
workbook

I am using:


Application.ConvertFormula(ActiveCell.FormulaR1C1, xlR1C1,xlA1,true,ActiveCel
l)

I get variant "Error 2015" back.

I *think* this is due to ConvertFormula appending the workbook name to
each reference internally and exceeding some string size limitation?

Are there any workarounds for this - I am using the ConvertFormula in
this way to standardise any formula to a $A$1 type. This is in
preparation for tokenising the references based on the $'s.

Any help would be appreciated,

Ant





All times are GMT +1. The time now is 04:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com