+ Reply to Thread
Results 1 to 6 of 6

Extracting first 2 digits from a string of text

  1. #1
    Forum Contributor
    Join Date
    03-08-2019
    Location
    England
    MS-Off Ver
    2016
    Posts
    104

    Extracting first 2 digits from a string of text

    Hello,

    Please could someone assist with the following; I need a formula to extract the first 2 digits of a string of text

    Col A

    MAN BEING 10/200 ASD QQ AZS ENT__1N
    WHALE HELPING 15/200 KRE WE GTR ENT__1N
    ELEPHANT HOLDING 18/200 KDS RB SOU
    HALO CROWN 20/200 QRE DB GTR ENP__2T
    PHONE SIM 50/200 QRE DB GTR ENP__2T
    MAN ABOVE 90/200 KDS RB RUS PUG 90.00


    Col B

    I need the first 2 numbers in the string of text

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Extracting first 2 digits from a string of text

    one option

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    if you want to coerce to a number add +0 to end

  3. #3
    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: Extracting first 2 digits from a string of text

    Enter formula in B1 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1 MAN BEING 10/200 ASD QQ AZS ENT__1N 10
    2 WHALE HELPING 15/200 KRE WE GTR ENT__1N 15
    3 ELEPHANT HOLDING 18/200 KDS RB SOU 18
    4 HALO CROWN 20/200 QRE DB GTR ENP__2T 20
    5 PHONE SIM 50/200 QRE DB GTR ENP__2T 50
    6 MAN ABOVE 90/200 KDS RB RUS PUG 90.00 90
    Or this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by AlKey; 03-13-2019 at 12:47 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

  4. #4
    Forum Contributor
    Join Date
    03-08-2019
    Location
    England
    MS-Off Ver
    2016
    Posts
    104

    Re: Extracting first 2 digits from a string of text

    Wonderful. Thank you both so much. How do I make the Col B submit a 3 digit code? so rather than 10 or 15 or 18 etc it reads 010 / 015 / 018

  5. #5
    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: Extracting first 2 digits from a string of text

    Try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1 MAN BEING 10/200 ASD QQ AZS ENT__1N 010
    2 WHALE HELPING 15/200 KRE WE GTR ENT__1N 015
    3 ELEPHANT HOLDING 18/200 KDS RB SOU 018
    4 HALO CROWN 20/200 QRE DB GTR ENP__2T 020
    5 PHONE SIM 50/200 QRE DB GTR ENP__2T 050
    6 MAN ABOVE 90/200 KDS RB RUS PUG 90.00 090

  6. #6
    Forum Contributor
    Join Date
    03-08-2019
    Location
    England
    MS-Off Ver
    2016
    Posts
    104

    Re: Extracting first 2 digits from a string of text

    thank you!

+ 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] extracting a string of digits
    By Lizzietish11 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-17-2015, 10:27 AM
  2. VBA code for extracting last three digits from alphanumeric string.
    By klantacook in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-01-2013, 05:30 PM
  3. [SOLVED] extracting digits only from column with letters and digits
    By Jayne in forum Excel General
    Replies: 11
    Last Post: 08-20-2012, 10:38 PM
  4. [SOLVED] Extracting Text from a string of Text & Digits of variable length
    By hastex in forum Excel General
    Replies: 6
    Last Post: 06-06-2012, 09:11 AM
  5. Need insert a dash in between last 4 digits in text string
    By Alok in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 07:05 PM
  6. Need insert a dash in between last 4 digits in text string
    By Phil in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  7. [SOLVED] Need insert a dash in between last 4 digits in text string
    By Phil in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM

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