View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
StanUkr
 
Posts: n/a
Default How I can calculate the value of string "120+150+120... etc"


vezerid Wrote:
Use this VBA function:

Function eval(s As String)
eval = Application.Evaluate("=" & s)
End Function

Then you can use this in a cell as:

=eval(A1)

To install,
Alt+F11 to go to the VBA editor.
Insert | Module
Paste the above code.
Ready to use

HTH
Kostis Vezerides


Thank U! that's exatcly what i need! Custom formula was the best
solution here...


--
StanUkr
------------------------------------------------------------------------
StanUkr's Profile: http://www.excelforum.com/member.php...o&userid=27232
View this thread: http://www.excelforum.com/showthread...hreadid=530430