+ Reply to Thread
Results 1 to 7 of 7

Forcing Calculation

  1. #1
    Registered User
    Join Date
    10-14-2010
    Location
    BC Canada
    MS-Off Ver
    Excel 365
    Posts
    77

    Forcing Calculation

    Hi

    I have a cells with a value similar to
    1.2.3
    And I have some code to turn it into a formula.
    Please Login or Register  to view this content.
    which gives me: = 1*100+2*10+3
    in the cell. The problem is that it doesn't calculate. I guess excel just sees it as text.
    I've tried value, clean, trim...past special..Although I'd rather just have a formula that doesn't it rather then having to manually copy and past something.

    Thanks

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Forcing Calculation

    Here's a possiblity. It requires an additional cell. Let's say your digits (1.2.3) are in A2, your Concat formula is in B2 and you want your result to be in C2

    Select C2, Formulas Tab> Name Manager
    Name Eval1
    Refers to: = Evaluate(B2)

    Then, whereever you have a formula like in B2, to the right of it (i.e. in C2) enter
    =Eval1
    You should see 123 for your example
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    10-14-2010
    Location
    BC Canada
    MS-Off Ver
    Excel 365
    Posts
    77

    Re: Forcing Calculation

    It works, but I've got a list of hundreds of these values, and I'd really rather do it in one cell.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Forcing Calculation

    How about =--SUBSTITUTE(A1, ".", "")
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Forcing Calculation

    ... or just find and replace . with nothing

  6. #6
    Registered User
    Join Date
    10-14-2010
    Location
    BC Canada
    MS-Off Ver
    Excel 365
    Posts
    77

    Re: Forcing Calculation

    I made a mistake on my origonal code. It should be:

    Please Login or Register  to view this content.
    So 1.2.3 should come out to 10203, otherwise of course, removing the . would be easy...

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Forcing Calculation

    Replace . with 0

+ 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