• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

calculating value in another cell for operation given in a cell

dear all,
say i have written 4*96+3*94 in a cell A1. I want the value of this in another cell say B1 by using A1.
what formula can i use in B1 to get the result.

thanks and regards
 
That is not how Excel works. Place the values 4; 96; 3 ; 94 in cells
[A1] = 4
[A2]= 96
[A3] =3
[A4] =94
[B1] = A1*A2+A3*A4
 
Try to use "EVALUATE" function.

1] Data put in Column A, in A1 enter : 4*96+3*94

2] Create a "Ranged Name" by :
Select B1 >> Goto "Define Name" >>
Name: TextCalcu
Refers to: =EVALUATE(A1)

3] In B1, enter formula :

=TextCalcu

and B1 will return 666 - the desired result

p.s. : "EVALUATE" is a Excel 4 Macro function, so you need to save file as Macro-Enable Workbook xlsm type.

Regards
Bosco
 
Last edited:
Who knew?
Found this easily when googling -> https://exceloffthegrid.com/using-excel-4-macro-functions/
Microsoft replaced Excel 4 Macros with VBA in 1993, so it is amazing they still work in Excel 2016 (released 23 years later).

That is roughly 7-8 years before I even started using Excel and so I feel less ashamed of not knowing. And even in the latest release version 2019, it still is supported!!

EDIT: Couldn't help myself and had to revert to a Power Query solution. It uses "Expression.Evaluate" for crying out loud. The advantage of this is it does not require saving as .xlsm.
 

Attachments

  • EvaluateWithPQ.xlsx
    17.7 KB · Views: 5
Last edited:
I've suggested the EVALUATE function many times on this board and others, but people rather use complex formulas.
Probably more glamorous? :DD
 
Back
Top