Search code examples
mathgoogle-sheetsindexinggoogle-sheets-formulagoogle-query-language

How to evaluate a string in google spreadsheet


I wonder if this is possible in google sheet:


cell A2 has string  100*2 + 50

How to get the result in another cell, such as A3 = evaluate(A2) and get 250?

I have shared public google sheet "stringEvaluate" here:

https://docs.google.com/spreadsheets/d/10NzbtJhQj4hQBnZXcmwise3bLBIAWrE0qwSus_bz7a0/edit#gid=337388679

Required

Get the mathematical result from another string cell

My attempt

=query(A2)   This gives the same string, does not evaluate

Solution

  • try:

    =INDEX(QUERY(, "select "&A2), 2)
    

    enter image description here