ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formula from closed workbook? (https://www.excelbanter.com/excel-programming/441568-formula-closed-workbook.html)

Oswald

Formula from closed workbook?
 
Please advise me is it possible to read/extract a formula from a
closed workbook eg. =IF(ISNUMBER(N26),MAX(N26*$N$2,M26),$O$1) from
say cell(26, 15) of a closed workbook, I've tried so far using
variations of ExecuteExcel4Macro() and an ADO routine but have only
returned values. I have a number of similar workbooks where the
contents of that cell can have 1 of 4 different formulas that I need
to determine.
Thanks in advance Oswald

Dave Peterson

Formula from closed workbook?
 
I don't have a way.

But I'd just turn off screenupdating, open the other workbook, grab what I need,
and close that other workbook.

It seems much easier to me.

Oswald wrote:

Please advise me is it possible to read/extract a formula from a
closed workbook eg. =IF(ISNUMBER(N26),MAX(N26*$N$2,M26),$O$1) from
say cell(26, 15) of a closed workbook, I've tried so far using
variations of ExecuteExcel4Macro() and an ADO routine but have only
returned values. I have a number of similar workbooks where the
contents of that cell can have 1 of 4 different formulas that I need
to determine.
Thanks in advance Oswald


--

Dave Peterson

Simon

Formula from closed workbook?
 
SUMPRODUCT might be what you are looking for.
Depending on how many calculations you have to do it can be a bit slow.
Cheers
Simon

"Oswald" wrote:

Please advise me is it possible to read/extract a formula from a
closed workbook eg. =IF(ISNUMBER(N26),MAX(N26*$N$2,M26),$O$1) from
say cell(26, 15) of a closed workbook, I've tried so far using
variations of ExecuteExcel4Macro() and an ADO routine but have only
returned values. I have a number of similar workbooks where the
contents of that cell can have 1 of 4 different formulas that I need
to determine.
Thanks in advance Oswald
.



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

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