#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default INDIRECT FUNCTION

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!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default INDIRECT FUNCTION

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!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default INDIRECT FUNCTION

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!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default INDIRECT FUNCTION

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!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default INDIRECT FUNCTION

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/30...-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!



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default INDIRECT FUNCTION

XClent idea of Name Defining!
--
Thanx & Best Regards,

Faraz!


"מיכאל (מיקי) אבידן" wrote:

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/30...-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!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
trying to use Indirect function Eric_in_EVV[_2_] Excel Worksheet Functions 5 December 2nd 09 06:51 PM
Using INDIRECT Function and INDEX Function ChristopherG Excel Discussion (Misc queries) 1 June 10th 09 04:07 PM
How to use indirect function? Eric Excel Discussion (Misc queries) 2 November 20th 08 05:17 AM
Indirect function andy Excel Worksheet Functions 3 June 28th 07 07:40 AM
INDIRECT function inside AND function Biff Excel Worksheet Functions 3 September 23rd 06 07:20 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"