The result of a formula referring to a cell with formula as text?

  • Thread starter Thread starter JCC
  • Start date Start date
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
 
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
 
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. "=AL6>0") how do
I see the result of that formula by referencing A1?
 
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
 
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)
 
Text in A1 '=AL6>0 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
 
How do I get the =EvalCell function?

Gord Dibben said:
Text in A1 '=AL6>0 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
 
Back
Top