+ Reply to Thread
Results 1 to 5 of 5

How to extract numbers for calculation when entering a string of text into a cell

  1. #1
    Forum Contributor
    Join Date
    10-02-2021
    Location
    Thailand
    MS-Off Ver
    365
    Posts
    176

    How to extract numbers for calculation when entering a string of text into a cell

    Please Login or Register  to view this content.

    Why can't the code get results


    Cell A1 Key in OD9.525*0.8mm*850mmL

    formula like this ((9.525-0.8)*850*8.96)/1000

    Cell B1 Get result is 66.4496
    Last edited by choletseng; 02-23-2024 at 08:41 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,205

    Re: How to extract numbers for calculation when entering a string of text into a cell

    You need to remove "OD" from first dimension and "L" from units of last dimension.

    Use REPLACE if these are generic values.

    Temporary code:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: How to extract numbers for calculation when entering a string of text into a cell

    Try change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    With Regular Expression
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: How to extract numbers for calculation when entering a string of text into a cell

    Remove "OD" and the letter "L" from cell A1
    or insert "L" into your formula for ln.

    If you do that you get the correct result
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  5. #5
    Forum Contributor
    Join Date
    10-02-2021
    Location
    Thailand
    MS-Off Ver
    365
    Posts
    176

    Re: How to extract numbers for calculation when entering a string of text into a cell

    Wow, you two are so amazing. The problem has finally been successfully solved. Thank you both

+ 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. [SOLVED] Extract numbers from text string
    By Delta729 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-18-2018, 04:54 PM
  2. [SOLVED] Extract numbers from text string
    By cmb80 in forum Excel General
    Replies: 3
    Last Post: 05-22-2017, 05:17 AM
  3. Extract Several Numbers From Text String
    By mvl3589 in forum Excel General
    Replies: 5
    Last Post: 06-21-2016, 08:11 PM
  4. [SOLVED] Extract numbers from text string
    By reynoldslarry in forum Excel General
    Replies: 6
    Last Post: 10-25-2014, 03:22 PM
  5. extract and sum numbers from a text string
    By Shazwb in forum Excel General
    Replies: 5
    Last Post: 08-28-2011, 09:24 PM
  6. Extract numbers from text string
    By mkvassh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-24-2009, 08:53 AM
  7. [SOLVED] EXTRACT NUMBERS FROM TEXT STRING
    By fiber_doc in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-28-2005, 02:45 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