+ Reply to Thread
Results 1 to 3 of 3

Question - extracting a number surrounded by text

  1. #1
    Registered User
    Join Date
    01-04-2008
    Posts
    2

    Question - extracting a number surrounded by text

    Hi, does anyone have any idea how to extract/find/retrieve a number from a cell that contains text? The position of the number from cell to cell may change.

    THANK YOU for any help!

    Example:
    (H) 344 mm Hg
    * (L) (c) 51 mm Hg

    Desired:
    344
    51

    Thanks again!
    Last edited by VBA Noob; 01-04-2008 at 06:36 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    It depends on the consistency of your data, assuming your number is always followed by a space and then mm try

    =TRIM(RIGHT(SUBSTITUTE(LEFT(A1,FIND("mm",A1)-2)," ",REPT(" ",99)),99))

  3. #3
    Registered User
    Join Date
    01-04-2008
    Posts
    2

    Talking

    thank you! works perfect

    :D

+ 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