+ Reply to Thread
Results 1 to 9 of 9

how to extract second number in a text?

  1. #1
    Registered User
    Join Date
    01-03-2014
    Location
    indonesia
    MS-Off Ver
    Excel 2007
    Posts
    19

    how to extract second number in a text?

    Hello Guys,

    i need help from you guys, about how to extract 2nd number in a text.
    For example in Cell A1 & A2, there is a word :
    "70% With a 30-day post dated cheque, received before the item is shipped"
    "100% cash, received 45 days before the item is shipped"

    how to get "30" and "45" numbers using a formula?

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: how to extract second number in a text?

    Do you have more sample data than just the two?

  3. #3
    Registered User
    Join Date
    01-03-2014
    Location
    indonesia
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: how to extract second number in a text?

    80% Dengan Giro Mundur 60 hari, diterima sebelum barang dikirim
    5% Retensi selama 6 bulan
    90% Paling lambat 45 hari setelah MOS
    5% Setelah Test Comm atau maksimal 3 bulan setelah pengiriman barang
    80% Dengan Giro Mundur 1 bulan, diterima sebelum barang dikirim
    5% Setelah Test Comm atau maksimal 3 bulan setelah barang dikirim
    100% Dengan Giro Mundur 45 hari, diterima sebelum pengiriman barang
    80% Paling lambat 1 bulan setelah MOS
    100% Paling lambat 30 hari setelah barang & invoice diterima
    100% Paling lambat 30 hari setelah barang dikirim

    the bold numbers is the data that i want to get.
    could you please help me?
    Last edited by AliGW; 02-19-2019 at 03:56 AM.

  4. #4
    Forum Contributor
    Join Date
    06-01-2014
    Location
    Riyadh, Saudi Arabia
    MS-Off Ver
    Microsoft 365
    Posts
    224

    Re: how to extract second number in a text?

    Place this Array function in Cell B2:

    =1*MID(A1,FIND(" ",$A1,1)+MATCH(TRUE,ISNUMBER(1*MID(A1,FIND(" ",$A1,1)+ROW($1:$100),1)),0),COUNT(1*MID(A1,FIND(" ",$A1,1)+ROW($1:$100),1)))

    CTRL + SHIFT + ENTER

  5. #5
    Registered User
    Join Date
    01-03-2014
    Location
    indonesia
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: how to extract second number in a text?

    wow, thanks mate!!
    Last edited by AliGW; 02-19-2019 at 03:56 AM.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,812

    Re: how to extract second number in a text?

    Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: how to extract second number in a text?

    try this one too

    =MAX(IFERROR(--RIGHT(MID(LEFT(A1,MAX(ISNUMBER(--MID(A1,ROW($A$1:$A$100),1))*ROW($A$1:$A$100))),FIND("%",A1),LEN(A1)),ROW($A$1:$A$100)),0))

    CTRL + SHIFT + ENTER

  8. #8
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: how to extract second number in a text?

    or enough with this
    =MAX(IFERROR(--RIGHT(LEFT(A1,MAX(ISNUMBER(--MID(A1,ROW($A$1:$A$100),1))*ROW($A$1:$A$100))),ROW($1:$10)),0))

    CTRL + SHIFT + ENTER

  9. #9
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: how to extract second number in a text?

    This should work for you
    Enter formula in B1 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1 80% Dengan Giro Mundur 60 hari, diterima sebelum barang dikirim 60
    2 5% Retensi selama 6 bulan 6
    3 90% Paling lambat 45 hari setelah MOS 45
    4 5% Setelah Test Comm atau maksimal 3 bulan setelah pengiriman barang 3
    5 80% Dengan Giro Mundur 1 bulan, diterima sebelum barang dikirim 1
    6 5% Setelah Test Comm atau maksimal 3 bulan setelah barang dikirim 3
    7 100% Dengan Giro Mundur 45 hari, diterima sebelum pengiriman barang 45
    8 80% Paling lambat 1 bulan setelah MOS 1
    9 100% Paling lambat 30 hari setelah barang & invoice diterima 30
    10 100% Paling lambat 30 hari setelah barang dikirim 30
    Last edited by AlKey; 02-19-2019 at 12:07 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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. Extract number from text
    By madhatter40 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-14-2016, 08:15 PM
  2. [SOLVED] Extract certain text dependant on number of characters in text
    By bjoanmark in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-28-2014, 02:57 AM
  3. [SOLVED] Extract Number from text
    By triaji in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-17-2014, 04:02 AM
  4. extract number from text and number cell
    By south in forum Excel General
    Replies: 15
    Last Post: 08-23-2014, 03:28 AM
  5. [SOLVED] Extract text and number from a long text
    By tantcu in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-10-2013, 01:13 PM
  6. Extract Number from text
    By mohd_arastu in forum Excel General
    Replies: 3
    Last Post: 12-17-2011, 01:21 PM
  7. [SOLVED] Extract number from text/number string..
    By nastech in forum Excel General
    Replies: 5
    Last Post: 07-05-2006, 06:25 PM

Tags for this Thread

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