+ Reply to Thread
Results 1 to 3 of 3

Pull codes from list based on number of orders

  1. #1
    Registered User
    Join Date
    07-29-2011
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    14

    Exclamation Pull codes from list based on number of orders

    Hello all!

    I have a long list (3000 or so) of unique codes. On another sheet, I have a list of customer name, customer email address, and the number of purchases they have made. I am trying to figure out a way to drop in codes on this 2nd sheet based on the number of purchases they have made, and not drop in one code more than one time.

    Ex. If John Smith purchased 3, I would like codes one to three to be inserted in the same cell next to this customer.

    Then, the next customer purchased 5, so I would like codes four to eight to be put in the same cell next to this customer.

    Can anyone help or point me in the right direction?

    Thanks!

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Pull codes from list based on number of orders

    Hi cshort,

    What you can do is have a counter on Sheet 1 (one with unique codes) that tests whether or not that customer name is the same as what you selected on Sheet 2. This can be done in a variety of ways.
    I.e. the first instance where this customer occurs, show 1, 2nd instance, 2, etc.

    You can then use INDEX + MATCH to collate the list in Sheet 2.

    Note: Posting a sample workbook would help.

  3. #3
    Registered User
    Join Date
    07-29-2011
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Pull codes from list based on number of orders

    Sorry about that! Here is an example spreadsheet. On sheet 1 I have a list of 64 unique codes. In sheet 2, I have a total of 64 orders (some customers may have ordered multiple) and I have manually filled in the first couple of lines to show what I am trying to accomplish.

    Thanks!
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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