+ Reply to Thread
Results 1 to 4 of 4

match number in a string of numbers

Hybrid View

  1. #1
    cmoore
    Guest

    match number in a string of numbers

    I have a column of 5 digit numbers, the first 3 digits are an item code and
    the last 2 identify which customer it is going to. In an adjacent column I
    have the quantity of the product is being pulled by the customer.

    How do I lookup the last 2 digits, to identify the customer, and get the
    quantity that is being pulled without having to go through the sheet of
    hundreds of different orders?

    I am stuck.

  2. #2
    Gary''s Student
    Guest

    RE: match number in a string of numbers

    Let's say you order numbers are in column A and amounts are in column B. In
    C1 enter

    =RIGHT(A1,2) and copy down. This will display your customer id.

    Next pull_down:

    Data > Filter > Autofilter This will permit you to select any particular
    customer id and view only that customer's rows of data.
    --
    Gary''s Student


    "cmoore" wrote:

    > I have a column of 5 digit numbers, the first 3 digits are an item code and
    > the last 2 identify which customer it is going to. In an adjacent column I
    > have the quantity of the product is being pulled by the customer.
    >
    > How do I lookup the last 2 digits, to identify the customer, and get the
    > quantity that is being pulled without having to go through the sheet of
    > hundreds of different orders?
    >
    > I am stuck.


  3. #3
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    You could combine the SUMPRODUCT and RIGHT functions.

    In C2

    =SUMPRODUCT((RIGHT(A1:A500,2)*1=Your customer ID)*(B1:B500))

    If you also need to incorporate the product number then:

    =SUMPRODUCT((RIGHT(A1:A500,2)*1=Your customer ID)*(LEFT(A1:A500,3)*1=Your Product number)*(B1:B500))

    Does that help?


    Steve

  4. #4
    Toppers
    Guest

    RE: match number in a string of numbers

    This will total quantity for customer 44

    =SUMPRODUCT(--(RIGHT(A2:A10,2)="44"),--(B2:B10))

    HTH

    "cmoore" wrote:

    > I have a column of 5 digit numbers, the first 3 digits are an item code and
    > the last 2 identify which customer it is going to. In an adjacent column I
    > have the quantity of the product is being pulled by the customer.
    >
    > How do I lookup the last 2 digits, to identify the customer, and get the
    > quantity that is being pulled without having to go through the sheet of
    > hundreds of different orders?
    >
    > I am stuck.


+ 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