From: Faraz A. Qureshi on
I have a A1 with a formula ="+2+2"
I thought =INDIRECT(A1) would reflect 4 whereas it is returning #Ref!
How to carryout the desired function?
--
Thanx & Best Regards,

Faraz!
From: Jacob Skaria on
INDIRECT() evaluates cell references are display their contents...You can try
something like the below.

=EquateFormula(A1)

Function EquateFormula(strData As String) As Variant
EquateFormula = Application.Evaluate("=" & strData)
End Function

--
Jacob


"Faraz A. Qureshi" wrote:

> I have a A1 with a formula ="+2+2"
> I thought =INDIRECT(A1) would reflect 4 whereas it is returning #Ref!
> How to carryout the desired function?
> --
> Thanx & Best Regards,
>
> Faraz!
From: Jacob Skaria on
Since you have '=' sign in your cell...

Function EquateFormula(strData As String) As Variant
EquateFormula = Application.EVALUATE(strData)
End Function

--
Jacob


"Faraz A. Qureshi" wrote:

> I have a A1 with a formula ="+2+2"
> I thought =INDIRECT(A1) would reflect 4 whereas it is returning #Ref!
> How to carryout the desired function?
> --
> Thanx & Best Regards,
>
> Faraz!
From: Faraz A. Qureshi on
I see!
That means a formula type string can't be evaluated with built-in functions?

--
Thanx & Best Regards,

Faraz!


"Jacob Skaria" wrote:

> Since you have '=' sign in your cell...
>
> Function EquateFormula(strData As String) As Variant
> EquateFormula = Application.EVALUATE(strData)
> End Function
>
> --
> Jacob
>
>
> "Faraz A. Qureshi" wrote:
>
> > I have a A1 with a formula ="+2+2"
> > I thought =INDIRECT(A1) would reflect 4 whereas it is returning #Ref!
> > How to carryout the desired function?
> > --
> > Thanx & Best Regards,
> >
> > Faraz!
From: מיכאל (מיקי) אבידן on
The question is what do you refer to as built-in functions ?
However - there are two work-arounds with no need for VBA code.
1) While the "+2+2" was typed in cell A1 > select cell B1 > press CTRL+F3 >
define the name EVALUATION and refer it to:
=EVALUATE(A1)
In cell B1 type EVALUATION [with no argument and/or parentheses !!!
-------------------
2) Download and activate the add-in MOREFUNC.
In B1 Type: =EVAL(A1) Function
http://download.cnet.com/Morefunc/3000-2077_4-10423159.html
-------------------
The MOREFUNC add-in has a lot of more handy and useful functions.
Micky


"Faraz A. Qureshi" wrote:

> I see!
> That means a formula type string can't be evaluated with built-in functions?
>
> --
> Thanx & Best Regards,
>
> Faraz!
>
>
> "Jacob Skaria" wrote:
>
> > Since you have '=' sign in your cell...
> >
> > Function EquateFormula(strData As String) As Variant
> > EquateFormula = Application.EVALUATE(strData)
> > End Function
> >
> > --
> > Jacob
> >
> >
> > "Faraz A. Qureshi" wrote:
> >
> > > I have a A1 with a formula ="+2+2"
> > > I thought =INDIRECT(A1) would reflect 4 whereas it is returning #Ref!
> > > How to carryout the desired function?
> > > --
> > > Thanx & Best Regards,
> > >
> > > Faraz!