+ Reply to Thread
Results 1 to 9 of 9

Formula to exact customer number only

  1. #1
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    Formula to exact customer number only

    Hello,

    I have a list of customer including customer name and customer number. Is there a way to exact customer number out only? This is the example list.

    WAL-MART STORES INC - 1028
    KOHL'S - 28983
    JOHN'S PET PRODUCTS - 3692
    PET SUPERMARKET, INC. - 2298
    COSTCO WHOLESALE - INTERNATIONAL - 2783
    LOBLAW CO-WESTERN GROCERS - 7424

    All I want is the number behind the dash. There are few customers that have more than 2 dashes.

    Thanks,

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formula to exact customer number only

    Hi,

    Is the number required always at the very end of each string?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  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: Formula to exact customer number only

    Try this in B2 copy formula and drag it down

    =TRIM(RIGHT(SUBSTITUTE(A2," -",REPT(" ",255)),255))

    A
    B
    2
    WAL-MART STORES INC - 1028 1028
    3
    KOHL'S - 28983 28983
    4
    JOHN'S PET PRODUCTS - 3692 3692
    5
    PET SUPERMARKET, INC. - 2298 2298
    6
    COSTCO WHOLESALE - INTERNATIONAL - 2783 2783
    7
    LOBLAW CO-WESTERN GROCERS - 7424 7424
    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
    10-01-2013
    Location
    Cameron, Mo
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Formula to exact customer number only

    Try
    =RIGHT(A1,LEN(A1)-FIND("|",SUBSTITUTE(A1," ","|",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))
    Good luck

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula to exact customer number only

    Maybe this...

    =MID(A2,MIN(FIND({1,2,3,4,5,6,7,8,9,0},A2&1234567890)),10)

    Note that this returns the number as a TEXT string. This would be necessary if any of the number strings start with leading zeros.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Formula to exact customer number only

    Thanks everyone. They are all working great!!!

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Formula to exact customer number only

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula to exact customer number only

    You're welcome. We appreciate the feedback!

  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: Formula to exact customer number only

    Thanks for the feedback!

+ 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. Completing a Formula with Account Number and Customer Name
    By InterstateRentals in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-07-2014, 06:26 PM
  2. Formula to work out an exact average over an exact number
    By Sandyshirl in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-11-2013, 01:35 AM
  3. [SOLVED] Pulling the customer name when I enter the customer number
    By c.seely in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-04-2012, 01:12 PM
  4. replace customer number with customer name
    By openyamind in forum Excel General
    Replies: 3
    Last Post: 11-10-2011, 06:59 PM
  5. Replies: 6
    Last Post: 05-18-2009, 07:40 PM

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