+ Reply to Thread
Results 1 to 7 of 7

Numbering Sequence based on two criteria.

  1. #1
    Registered User
    Join Date
    06-03-2013
    Location
    Matamoros, Mexico
    MS-Off Ver
    Excel 2007
    Posts
    52

    Exclamation Numbering Sequence based on two criteria.

    Hello -

    I have a data sheet with sets of serials. Each set of serials is divided in two forms. The first form is the RMA# (which is a set of 40 serials), and secondly by Box# (wich is a set of 10 serials).

    My goal is to know how many serials are in each set and the Max of Boxes per set. I figured out the first part (to know how many serials are included in a set) (RMALine). But I am having trouble setting the second goal (The max of boxes per set).

    Basically saying, to give sequential numbering (1, 2, 3, ....) to each box in the RMABox column until the next RMA# appear. And then restart the sequence.

    Two criteria must be met:
    1st Criteria: RMA #
    2nd Criteria: Box #

    Also, I prefer Formula/Function and not VBA Code due to IT Systems Security.

    Can anyone help me?? I am attaching excel file for reference.
    Thank you very much for the support.

    SamCV.
    Matamoros, Mexico.
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Numbering Sequence based on two criteria.

    Copy this into B3 and paste downwards.

    =COUNTIF($D$3:$D$82,D3)-((SUMPRODUCT(($D$3:$D$82=D3)*($E$3:$E$82>E3))+1)+COUNTIFS($E$3:E3,E3,$D$3:$D3,D3)-1)+1

    This is an array formula, confirmed with Ctrl+Shift+Enter.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Numbering Sequence based on two criteria.

    hi SamCV. i'm thinking in another direction, so here's my solution in B3:
    =COUNTIFS(D$3:D3,D3,E$3:E3,E3)

    or:
    =SUMPRODUCT(--(D$3:D3&E$3:E3=D3&E3))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    06-03-2013
    Location
    Matamoros, Mexico
    MS-Off Ver
    Excel 2007
    Posts
    52

    Re: Numbering Sequence based on two criteria.

    Hello daffodil11 and benishiryo...

    I am glad to receive your help. Both answers are of great help. But the formulas counts the max of serials in each box. I need to assign sequential numbering to each box of the RMA.

    I modified a little bit the reference file so you can see what the goal is. Column E (RMABox) must look like Column D.

    I really appreciate your time and effort.

    SamCV.
    Matamoros, Mexico.
    Attached Files Attached Files

  5. #5
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Numbering Sequence based on two criteria.

    maybe you can try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-03-2013
    Location
    Matamoros, Mexico
    MS-Off Ver
    Excel 2007
    Posts
    52

    Thumbs up Re: Numbering Sequence based on two criteria.

    Quote Originally Posted by benishiryo View Post
    maybe you can try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Amazing!!! It worked smoothly!!!!

    Thank you very much!!! This will help me a lot with my Database.

    How can I mark this thread as SOLVED?? I know how to add reputation.

    Best regards and please have an excellent day!!!
    (Saludos cordiales y que tengas un excelente día!!!)

    SamCV.
    Matamomoros

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Numbering Sequence based on two criteria.

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Sequence numbering for each duplicate record
    By excel.help in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-01-2011, 05:48 PM
  2. Numbering a sequence
    By nods in forum Excel General
    Replies: 4
    Last Post: 10-06-2010, 11:00 AM
  3. Automatic Sequence Numbering with Autofilter
    By igi0814 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-18-2009, 03:37 AM
  4. Numbering Sequence
    By scw1217 in forum Excel General
    Replies: 1
    Last Post: 02-23-2009, 05:51 PM
  5. [SOLVED] sequence of page numbering from diffrent documents in to a footer
    By ndondo in forum Excel General
    Replies: 0
    Last Post: 03-09-2006, 06:10 AM

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