ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Returning the value of a named formula (https://www.excelbanter.com/excel-programming/303414-returning-value-named-formula.html)

Jazzer

Returning the value of a named formula
 
Hi,

I've defined some names in my workbook and I try to read the value o
those in my VB application.

The simple ones, which are like "=data!$A$2" (named as Xmin) are eas
to read with Range(ActiveWorkbook.Names("Xmin").Value).

How do I get the value of a named formula? (for exampl
=MAX(INDIRECT("data!A:A")) that is named as Xmax)

- Asse

--
Message posted from http://www.ExcelForum.com


papou[_9_]

Returning the value of a named formula
 
Hi Asser
Evaluate("Xmax")

HTH
Cordially
Pascal

"Jazzer " a écrit dans le message de
...
Hi,

I've defined some names in my workbook and I try to read the value of
those in my VB application.

The simple ones, which are like "=data!$A$2" (named as Xmin) are easy
to read with Range(ActiveWorkbook.Names("Xmin").Value).

How do I get the value of a named formula? (for example
=MAX(INDIRECT("data!A:A")) that is named as Xmax)

- Asser


---
Message posted from http://www.ExcelForum.com/




Jazzer[_2_]

Returning the value of a named formula
 
Hi & thanks for a quick reply

In case of a simple named range, evaluate works, but if I use it i
this "Xmax" situtation, I get an "Error 2023".

Should it be possible to use evaluate, when the name is actually
formula?

- Asse

--
Message posted from http://www.ExcelForum.com



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

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