+ Reply to Thread
Results 1 to 4 of 4

Copy text to cell and convert to numeric formula

  1. #1
    Registered User
    Join Date
    02-15-2014
    Location
    Albuquerque, NM
    MS-Off Ver
    Excel 2016
    Posts
    1

    Copy text to cell and convert to numeric formula

    I have a spreadsheet where I enter text values in a cell, e.g. (.5 x .5) x 2 x .009. I want to find a way to automatically populated the cell to the right with the formula version, e.g. =(.5 * .5) * 2 * x .009 and format as three decimal place number.

    One other question, is there a way to enter a template for entry in a cell. It would be nice if the text value above would take care of the parenthesis and multiplication signs for me.

    Thanks, Judy

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.95 for Mac MS 365
    Posts
    8,682

    Re: Copy text to cell and convert to numeric formula

    If I understand correctly you want say, in cell A2 to have (.5 x .5) x 2 x .009 then in cell B2 to pull the individual values and place them into a formula that is essentially the same but has the parens in order. I know you can do a cell that would accomplish the same but each value would have to be in its own cells. So A2 would have .5, B2 .5, C2 2 and D2 .009, then you could put the formula =(A2*B2)*C2*D2 in E2 and copy down (formatting the results in E2 to 3 decimal places).
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Copy text to cell and convert to numeric formula

    Maybe not what you had in mind but it works...

    A2 = (.5 x .5) x 2 x .009

    Enter this formula in B2:

    ="="&SUBSTITUTE(A2,"x","*")

    With B2 still selected, Right Click>Copy, Right Click>Paste Special>Values>OK

    CRTL H
    Find what: =
    Replace with: =
    Replace All

    Format as Number, 3 decimal places
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    12-06-2009
    Location
    B.C., Canada
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Copy text to cell and convert to numeric formula

    Hello,

    I am by far a pro, but see if this works for your first query.

    =SUM(MID(A2,2,2)*MID(A2,7,2))*MID(A2,13,1)*MID(A2,17,4)

    This results in a value of 0.0045, based on the figures you provided. If you are wanting the 3 decimal place result, 0.005, right click -> Format Cells - > select Number under Category -> then change the decimal places to 3, now it should show 0.005.

    Hope this helps

    Andrew

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 02-06-2006, 03:05 AM
  2. [SOLVED] convert text to numeric vba add-in?
    By Ron de Bruin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 11:05 AM
  3. convert text to numeric vba add-in?
    By sulmau in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  4. [SOLVED] convert text to numeric vba add-in?
    By sulmau in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  5. convert text to numeric vba add-in?
    By sulmau in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-25-2005, 04:05 PM

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