-2

With the cell A1 containing a formula saved as string. Ex: Sum(B1:B5)

In A2 I want to execute content of A1. But when I put =(=A1) in A2 excel gives me formula error. Is there any way I can execute content of A1 in A2 as formula Mind you no VBA is allowed. Can someone please help?

Please only those people should answer who have done this thing in the past. No hit and tries please

Pierre44
  • 1,711
  • 2
  • 10
  • 32
Noname
  • 349
  • 4
  • 11

3 Answers3

0

=A1

that's all you need to point the value to the value in cell A1

twenty49
  • 53
  • 8
0

The Evaluate function doesn't exist in Excel anymore. The only way you can use to evaluate properly is unfortunately only VBA.

In addition to the good answer of Durgaprasad. Here are some other ways to evaluate in the related question:

How to turn a string formula into a "real" formula

Pierre44
  • 1,711
  • 2
  • 10
  • 32
0

With VBA :

with VBA you can write some custom function and then evaluate the formula. Then call the function in excel wherever you required like below

=eval_formula(A1)

Function eval_formula(fr)
    eval_formula = Evaluate(fr.Value)
End Function

Refer the link here for more details

https://superuser.com/questions/253353/excel-function-that-evaluates-a-string-as-if-it-were-a-formula

without VBA:

Create a named range and use the named range inside the cell, I have attached the screenshots for your reference

Name Manager

enter image description here

hope this is what you required.

Durgaprasad
  • 323
  • 2
  • 14
  • Excel had this function Evaluate() which exactly doing what you need here. But I dont find this in recent versions, where VBA still have this evaluate(). Also using the same evaluate function with name manager gives what you required without VBA. try this link http://www.exceltoxl.com/index.php?p=383&more=1&c=1&tb=1&pb=1 – Durgaprasad Aug 24 '18 at 11:56