+ Reply to Thread
Results 1 to 8 of 8

How I can calculate the value of string "120+150+120... etc"

  1. #1
    Registered User
    Join Date
    09-14-2005
    Posts
    20

    How I can calculate the value of string "120+150+120... etc"

    Hello, All
    In A1 cell I have a text string like "120+130", sometimes more numbers to plus... Could you advice me what formula should I use to replace this with already summarized value. I've tried to use formula "="&A1 but it returnes text value "=120+130"...
    thanx for assistance

  2. #2
    Niek Otten
    Guest

    Re: How I can calculate the value of string "120+150+120... etc"

    Just insert the "=" in the cell itself in the formula bar

    --
    Kind regards,

    Niek Otten

    "StanUkr" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello, All
    > In A1 cell I have a text string like "120+130", sometimes more numbers
    > to plus... Could you advice me what formula should I use to replace
    > this with already summarized value. I've tried to use formula "="&A1
    > but it returnes text value "=120+130"...
    > thanx for assistance
    >
    >
    > --
    > StanUkr
    > ------------------------------------------------------------------------
    > StanUkr's Profile: http://www.excelforum.com/member.php...o&userid=27232
    > View this thread: http://www.excelforum.com/showthread...hreadid=530430
    >




  3. #3
    Sandy Mann
    Guest

    Re: How I can calculate the value of string "120+150+120... etc"

    One way, may not be what you want though.....

    Try Data > Text to Columns and select + as the delimiter then sum it as
    normal.

    --
    HTH

    Sandy

    In Perth, the ancient capital of Scotland
    [email protected]
    [email protected] with @tiscali.co.uk


    "StanUkr" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hello, All
    > In A1 cell I have a text string like "120+130", sometimes more numbers
    > to plus... Could you advice me what formula should I use to replace
    > this with already summarized value. I've tried to use formula "="&A1
    > but it returnes text value "=120+130"...
    > thanx for assistance
    >
    >
    > --
    > StanUkr
    > ------------------------------------------------------------------------
    > StanUkr's Profile:
    > http://www.excelforum.com/member.php...o&userid=27232
    > View this thread: http://www.excelforum.com/showthread...hreadid=530430
    >




  4. #4
    Registered User
    Join Date
    09-14-2005
    Posts
    20
    I need to calculate a summ just with the help of a function... the massive of data is too large to insert "=" manualy....
    text to column is also not suitable for my purpose...

    --
    Kind regards,

    Niek Otten

    "StanUkr" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello, All
    > In A1 cell I have a text string like "120+130", sometimes more numbers
    > to plus... Could you advice me what formula should I use to replace
    > this with already summarized value. I've tried to use formula "="&A1
    > but it returnes text value "=120+130"...
    > thanx for assistance
    >
    >
    > --
    > StanUkr
    > ------------------------------------------------------------------------
    > StanUkr's Profile: http://www.excelforum.com/member.php...o&userid=27232
    > View this thread: http://www.excelforum.com/showthread...hreadid=530430
    >
    [/QUOTE]

  5. #5
    vezerid
    Guest

    Re: How I can calculate the value of string "120+150+120... etc"

    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


  6. #6
    Registered User
    Join Date
    09-14-2005
    Posts
    20
    Quote Originally Posted by vezerid
    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...

  7. #7
    Jim May
    Guest

    Re: How I can calculate the value of string "120+150+120... etc"

    So how is it that I can end up getting #NAME?
    Always the "black-cloud-following-me", it seems...


    "vezerid" <[email protected]> wrote in message
    news:[email protected]...
    > 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
    >




  8. #8
    Jim May
    Guest

    Re: How I can calculate the value of string "120+150+120... etc"

    Never mind, the sun has come out.. LOL

    "Jim May" <[email protected]> wrote in message
    news:8C7Zf.55132$KE1.54201@dukeread02...
    > So how is it that I can end up getting #NAME?
    > Always the "black-cloud-following-me", it seems...
    >
    >
    > "vezerid" <[email protected]> wrote in message
    > news:[email protected]...
    >> 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
    >>

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1