Use a string in a formula

J

Jos Vens

Hi,

does someone know if it's possible and how it can be done to use a string in
formula like this

cell A1 contains Average
cell B1 contains =A1(C1:F1) which is the equivalent of =AVERAGE(C1:F1)

thanks
Jos Vens
 
R

Ron Rosenfeld

Hi,

does someone know if it's possible and how it can be done to use a string in
formula like this

cell A1 contains Average
cell B1 contains =A1(C1:F1) which is the equivalent of =AVERAGE(C1:F1)

thanks
Jos Vens

Download MOREFUNC.XLL from http://xcell05.free.fr/ and use the EVAL function.
It accepts strings so, in your instance, the function would read:

=EVAL(A1&"(C1:F1)")


--ron
 
J

Jos Vens

Hi Ron,

thanks, but I can't find the dutch translation of EVAL. How can I find it?

Jos
 
B

Bob Phillips

This does the same

Function eval(str)
Application.Volatile
eval = Evaluate(str)
End Function


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
R

Ron Rosenfeld

Hi Ron,

thanks, but I can't find the dutch translation of EVAL. How can I find it?

Jos

I believe Longre's add-in is only available in French and English.


--ron
 
J

Jos Vens

Thanks a lot for your help. I thought EVAL was a build-in function of
Excel. Now I see it is user defined, so I guess it must be a
lot slower than Excel's build-in functions (I have 10x100 of those functions
in my sheets)

Jos
 
N

Niek Otten

Hi Jos,

EVAL still uses the built-in Evaluate function. You just have the "overhead"
of 1000 "wrappers". That will cost you a fraction of a second for which you
need almost the width of a screen to display. You will not be able to
notice.

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel
 
B

Bob Phillips

A lot slower yes, but a mere 1000 is almost instantaneous.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top