ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   The result of a formula referring to a cell with formula as text? (https://www.excelbanter.com/excel-worksheet-functions/241514-result-formula-referring-cell-formula-text.html)

JCC

The result of a formula referring to a cell with formula as text?
 
Cell A1 content is "=B2". I want to reference A1 and get the contents of B2.

Eduardo

The result of a formula referring to a cell with formula as text?
 
Hi,
not sure what you mean you can reference A1 in C1 just entering in c1

=A1

let's say B2 has a name Peter

with A1 having the formula =B2 will show Peter

if you enter in cell C1 the formula given it will show Peter as well

"JCC" wrote:

Cell A1 content is "=B2". I want to reference A1 and get the contents of B2.


Jacob Skaria

The result of a formula referring to a cell with formula as text?
 
Cell A1 content is "=B2".
--If you mean =B2 as text try the below formula

=INDIRECT(MID(A1,2,LEN(A1)))

--If you mean formula =B2
=A1


If this post helps click Yes
---------------
Jacob Skaria


"JCC" wrote:

Cell A1 content is "=B2". I want to reference A1 and get the contents of B2.


JCC

The result of a formula referring to a cell with formula as te
 
Your answer is correct, but I didn't ask the right question. I simplified my
question too much. If I have a formula as text in A1 (i.e. "=AL60") how do
I see the result of that formula by referencing A1?

"Jacob Skaria" wrote:

Cell A1 content is "=B2".
--If you mean =B2 as text try the below formula

=INDIRECT(MID(A1,2,LEN(A1)))

--If you mean formula =B2
=A1


If this post helps click Yes
---------------
Jacob Skaria


"JCC" wrote:

Cell A1 content is "=B2". I want to reference A1 and get the contents of B2.


Jacob Skaria

The result of a formula referring to a cell with formula as te
 
You can reference a cell using INDIRECT but not the greater than sign..

A1 = '=A6'
=INDIRECT(MID(A1,2,LEN(A1))) 0

If this post helps click Yes
---------------
Jacob Skaria


"JCC" wrote:

Your answer is correct, but I didn't ask the right question. I simplified my
question too much. If I have a formula as text in A1 (i.e. "=AL60") how do
I see the result of that formula by referencing A1?

"Jacob Skaria" wrote:

Cell A1 content is "=B2".
--If you mean =B2 as text try the below formula

=INDIRECT(MID(A1,2,LEN(A1)))

--If you mean formula =B2
=A1


If this post helps click Yes
---------------
Jacob Skaria


"JCC" wrote:

Cell A1 content is "=B2". I want to reference A1 and get the contents of B2.


Glenn

The result of a formula referring to a cell with formula as te
 
Maybe something like this could work (as long as the result is true/false):

A1 = "AL6"
B1 = ""
C1 = "0"

(all without the quotes)

=COUNTIF(INDIRECT(A1),B1&C1)


JCC wrote:
Your answer is correct, but I didn't ask the right question. I simplified my
question too much. If I have a formula as text in A1 (i.e. "=AL60") how do
I see the result of that formula by referencing A1?

"Jacob Skaria" wrote:

Cell A1 content is "=B2".
--If you mean =B2 as text try the below formula

=INDIRECT(MID(A1,2,LEN(A1)))

--If you mean formula =B2
=A1


If this post helps click Yes
---------------
Jacob Skaria


"JCC" wrote:

Cell A1 content is "=B2". I want to reference A1 and get the contents of B2.


Gord Dibben

The result of a formula referring to a cell with formula as te
 
Text in A1 '=AL60 exactly as I have written

AL6 contains 123

In A2 enter =EvalCell(A1)

Returns TRUE

EvalCell is a UDF which will copy to a general module in your workbook.

Function EvalCell(RefCell As String)
Application.Volatile
EvalCell = Evaluate(RefCell)
End Function


Gord Dibben MS Excel MVP

On Wed, 2 Sep 2009 12:01:01 -0700, JCC
wrote:

Your answer is correct, but I didn't ask the right question. I simplified my
question too much. If I have a formula as text in A1 (i.e. "=AL60") how do
I see the result of that formula by referencing A1?

"Jacob Skaria" wrote:

Cell A1 content is "=B2".
--If you mean =B2 as text try the below formula

=INDIRECT(MID(A1,2,LEN(A1)))

--If you mean formula =B2
=A1


If this post helps click Yes
---------------
Jacob Skaria


"JCC" wrote:

Cell A1 content is "=B2". I want to reference A1 and get the contents of B2.



JCC

The result of a formula referring to a cell with formula as te
 
How do I get the =EvalCell function?

"Gord Dibben" wrote:

Text in A1 '=AL60 exactly as I have written

AL6 contains 123

In A2 enter =EvalCell(A1)

Returns TRUE

EvalCell is a UDF which will copy to a general module in your workbook.

Function EvalCell(RefCell As String)
Application.Volatile
EvalCell = Evaluate(RefCell)
End Function


Gord Dibben MS Excel MVP

On Wed, 2 Sep 2009 12:01:01 -0700, JCC
wrote:

Your answer is correct, but I didn't ask the right question. I simplified my
question too much. If I have a formula as text in A1 (i.e. "=AL60") how do
I see the result of that formula by referencing A1?

"Jacob Skaria" wrote:

Cell A1 content is "=B2".
--If you mean =B2 as text try the below formula

=INDIRECT(MID(A1,2,LEN(A1)))

--If you mean formula =B2
=A1


If this post helps click Yes
---------------
Jacob Skaria


"JCC" wrote:

Cell A1 content is "=B2". I want to reference A1 and get the contents of B2.




Gord Dibben

The result of a formula referring to a cell with formula as te
 
Read my post.

I provided it.


Gord

On Wed, 2 Sep 2009 14:42:01 -0700, JCC
wrote:

How do I get the =EvalCell function?

"Gord Dibben" wrote:

Text in A1 '=AL60 exactly as I have written

AL6 contains 123

In A2 enter =EvalCell(A1)

Returns TRUE

EvalCell is a UDF which will copy to a general module in your workbook.

Function EvalCell(RefCell As String)
Application.Volatile
EvalCell = Evaluate(RefCell)
End Function


Gord Dibben MS Excel MVP

On Wed, 2 Sep 2009 12:01:01 -0700, JCC
wrote:

Your answer is correct, but I didn't ask the right question. I simplified my
question too much. If I have a formula as text in A1 (i.e. "=AL60") how do
I see the result of that formula by referencing A1?

"Jacob Skaria" wrote:

Cell A1 content is "=B2".
--If you mean =B2 as text try the below formula

=INDIRECT(MID(A1,2,LEN(A1)))

--If you mean formula =B2
=A1


If this post helps click Yes
---------------
Jacob Skaria


"JCC" wrote:

Cell A1 content is "=B2". I want to reference A1 and get the contents of B2.





Dave Peterson

The result of a formula referring to a cell with formula as te
 
If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

JCC wrote:

How do I get the =EvalCell function?

"Gord Dibben" wrote:

Text in A1 '=AL60 exactly as I have written

AL6 contains 123

In A2 enter =EvalCell(A1)

Returns TRUE

EvalCell is a UDF which will copy to a general module in your workbook.

Function EvalCell(RefCell As String)
Application.Volatile
EvalCell = Evaluate(RefCell)
End Function


Gord Dibben MS Excel MVP

On Wed, 2 Sep 2009 12:01:01 -0700, JCC
wrote:

Your answer is correct, but I didn't ask the right question. I simplified my
question too much. If I have a formula as text in A1 (i.e. "=AL60") how do
I see the result of that formula by referencing A1?

"Jacob Skaria" wrote:

Cell A1 content is "=B2".
--If you mean =B2 as text try the below formula

=INDIRECT(MID(A1,2,LEN(A1)))

--If you mean formula =B2
=A1


If this post helps click Yes
---------------
Jacob Skaria


"JCC" wrote:

Cell A1 content is "=B2". I want to reference A1 and get the contents of B2.




--

Dave Peterson

JCC

The result of a formula referring to a cell with formula as te
 
Great information on macros! Thanks.

"Dave Peterson" wrote:

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

JCC wrote:

How do I get the =EvalCell function?

"Gord Dibben" wrote:

Text in A1 '=AL60 exactly as I have written

AL6 contains 123

In A2 enter =EvalCell(A1)

Returns TRUE

EvalCell is a UDF which will copy to a general module in your workbook.

Function EvalCell(RefCell As String)
Application.Volatile
EvalCell = Evaluate(RefCell)
End Function


Gord Dibben MS Excel MVP

On Wed, 2 Sep 2009 12:01:01 -0700, JCC
wrote:

Your answer is correct, but I didn't ask the right question. I simplified my
question too much. If I have a formula as text in A1 (i.e. "=AL60") how do
I see the result of that formula by referencing A1?

"Jacob Skaria" wrote:

Cell A1 content is "=B2".
--If you mean =B2 as text try the below formula

=INDIRECT(MID(A1,2,LEN(A1)))

--If you mean formula =B2
=A1


If this post helps click Yes
---------------
Jacob Skaria


"JCC" wrote:

Cell A1 content is "=B2". I want to reference A1 and get the contents of B2.



--

Dave Peterson



All times are GMT +1. The time now is 08:18 AM.

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