+ Reply to Thread
Results 1 to 6 of 6

write only numbers

Hybrid View

  1. #1
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: write only numbers

    Hi,

    The following ARRAY formula will exctract a numerical fragment from cell A2.

    =1*MID(A2,MATCH(TRUE,ISNUMBER(1*MID(A2,ROW($1:$9),1)),0),COUNT(1*MID(A2,ROW($1:$9),1)))
    Please modify as you require.

    An array formula must be entered using CTRL, SHIFT and ENTER.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  2. #2
    Registered User
    Join Date
    09-25-2007
    Posts
    21

    Re: write only numbers

    Please find attached file for better understanding
    Attached Files Attached Files
    Thanks & Regards
    Sandeep...

    INDIA

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: write only numbers

    This does exactly what your example requests.

    Hi,

    The following ARRAY formula will exctract a numerical fragment from cell A2.


     
     
    =1*MID(A2,MATCH(TRUE,ISNUMBER(1*MID(A2,ROW($1:$9),1)),0),COUNT(1*MID(A2,ROW($1:$9),1)))
    Please modify as you require.

    An array formula must be entered using CTRL, SHIFT and ENTER.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: write only numbers

    Sweep your's didn't work for the last one (for me at any rate).

    A non-array approach - not mine - Richard Schollar's

    C2:
    =LOOKUP(9.99E+307,--MID(A2,MIN(FIND({1,2,3,4,5,6,7,8,9,0},A2&1234567890)),ROW(INDIRECT("1:"&LEN(A2)))))
    For the 2nd number - assuming it is at the end of the string and is always preceded by " TO " then you could use

    D2: 
    =IF(ISNUMBER(SEARCH(" TO ",A2)),0+MID(A2,SEARCH(" TO ",A2)+3,1000),"")
    Last edited by DonkeyOte; 02-20-2009 at 04:46 AM.

+ 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