+ Reply to Thread
Results 1 to 6 of 6

Removing letters from text & letters combination

  1. #1
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    376

    Removing letters from text & letters combination

    removing letters from numbers and letters combo.xlsx

    Anyone able to put a formula in column C?

    Basically want the letters out of VAT Numbers, in our database, some have the country letters at the beginning and some don't.. Need them all as the numbers only for intrastats

  2. #2
    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: Removing letters from text & letters combination

    Try this formula

    =MID(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789")),SUM(LEN(A2)-LEN(SUBSTITUTE(A2,{0,1,2,3,4,5,6,7,8,9},""))))
    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

  3. #3
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Removing letters from text & letters combination

    =sumproduct(mid(0&a2,large(index(isnumber(--mid(a2,row($1:$25),1))*
    row($1:$25),0),row($1:$25))+1,1)*10^row($1:$25)/10)
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: Removing letters from text & letters combination

    AFAIK - if there are letters, it is always 2-leter, so simple formula would be:

    =IF(CODE(A2)>=65,1*MID(A2,3,100),A2)

    1* is used to convert text into number and 100 is used to be much too long to cover any length of VAT number
    Best Regards,

    Kaper

  5. #5
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    376

    Re: Removing letters from text & letters combination

    Quote Originally Posted by AlKey View Post
    Try this formula

    =MID(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456789")),SUM(LEN(A2)-LEN(SUBSTITUTE(A2,{0,1,2,3,4,5,6,7,8,9},""))))
    Thanks

    Cheers to the other two also, as always....a million ways to skin a cat in Excel.

  6. #6
    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: Removing letters from text & letters combination

    You're welcome and thank you for your feedback!

    Please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).

+ 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. Macro Scenario/Combination of letters
    By GCo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-27-2010, 05:28 PM
  2. Sum numbers with certain combination of letters
    By sizcorx in forum Excel General
    Replies: 1
    Last Post: 10-09-2010, 09:10 PM
  3. Removing all text except numbers and letters
    By stoopkid in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-04-2007, 11:25 PM
  4. finding out the combination of letters!
    By via135 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-13-2006, 01:12 AM
  5. [SOLVED] random combination of letters
    By rp in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-16-2005, 10: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