+ Reply to Thread
Results 1 to 11 of 11

Formula to count repair parts based on multiple row critierias

  1. #1
    Registered User
    Join Date
    01-27-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    7

    Formula to count repair parts based on multiple row critierias

    Dear Experts,

    I need some help to do some counting. I have a database which contains repair order lines. I need to count the following,

    1. Number of repairs done using "Kit"
    2. Number of repairs done using "Singles"
    3. Number of repairs done using "Kit" + "Singles"

    The fields available

    1. Sales Order : 1 sales order can contain number units sent in for repair (multiple line number)
    2. Line Number: Line number indicates the number of units sent in for repair (#1 means this is the first unit, #2 means this is the 2nd unit etc.. )
    3. Part Type : The classification of spare part type, either "Kit" or "Single"

    Data organization :

    1. Each row contains the spare part used in the repair (Sales Order can be duplicated if there are more than 1 unit in this order for repair) & Line Number can also be duplicated if there are more than 1 spare parts used for the same unit under repair.

    As there are more than 20 thousands line per country, it is quite impossible to get it manually counted. Is there any formula that can help me automate the task of counting? (in a single worksheet? or copy into 3 different worksheets and do the manual filtering?)

    Thanks,
    Derrick
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Formula to count repair parts based on multiple row critierias

    on your example
    can you provide the answers you hoped to get from that data sheet

    1. Number of repairs done using "Kit" = 3 is that correct number of times you see Kit - OR if a different answer why - what are the rules
    2. Number of repairs done using "Singles" = 7 is that correct number of times you see single - OR if a different answer why - what are the rules
    3. Number of repairs done using "Kit" + "Singles" and 10 again if different why
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Formula to count repair parts based on multiple row critierias

    What is your expected results?
    Quang PT

  4. #4
    Registered User
    Join Date
    01-27-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Formula to count repair parts based on multiple row critierias

    Hi etaf and bebo021999,

    Sorry for not being clear enough, I had updated the file and use color code to classify the expected result.

    In the same sales order with more than 1 line #, means it is more than 1 item for repair.
    For example,
    Sales order 1234, there are 3 lines(meaning 3 items for repair), row 1,2 and 3 belongs to item#1 (because all of the parts used belong to line #1)
    row 4 belongs to item#2 and row 5 belongs to item#3.

    Is this clear? Or am I making it worse?
    Attached Files Attached Files

  5. #5
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Formula to count repair parts based on multiple row critierias

    Can the line number be across various rows or will they be continuous. Like in the sample you have all the same line numbers of an order are together. for example first 2-4 rows have 1 line number. Can this be scattered? So can you have Line number #1 in row 2, then line number #2 in row 3 and then again #1 for the same order in row 4?
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  6. #6
    Registered User
    Join Date
    01-27-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Formula to count repair parts based on multiple row critierias

    hi Sourabhg98,

    Thanks for helping, they will not be scattered, the line number will be in sequential order if there are more than 1 items for repair in the same order number. If there is only 1 item inside the order #, it will be only line #1, follow by different rows of parts used (if more than 1 part are used). After that will be another order number and it will start with line #1 again.

    Derrick

  7. #7
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Formula to count repair parts based on multiple row critierias

    Okay check attached. Check the "result" sheet for the results.
    This was really a challenging problem.
    I think I cracked it finally.
    please note that 12 here represents total rows + 1,
    In H2-
    Please Login or Register  to view this content.
    In I2-
    Please Login or Register  to view this content.
    Just replace 12 by number of rows in your data + 1 and copy down the formula.
    Attached Files Attached Files

  8. #8
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Formula to count repair parts based on multiple row critierias

    Making it more convenient to use.
    Nothing to change in the formulas.
    Just copy them down to the end of your data.

    note- this would work for 100K rows of data.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-27-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    7
    Thanks sourabhg98, let me test and check it out. As the file have more than 20k lines of data, let me digure out how to test the integrity of the result to make sure all is ok as i have to duplicate the same counting to other countries.

  10. #10
    Registered User
    Join Date
    01-27-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Formula to count repair parts based on multiple row critierias

    hi sourabhg98, Yes the formula should work... I only checked a few hundred repair entries and the results are correct
    I am wondering why do the result for kit + single appear on the first line # whereas the kit and single will appear on the last line #

    Many thanks for your help (and others too).

  11. #11
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Formula to count repair parts based on multiple row critierias

    No there is no reason for that. I could have made them all show results in the last line. That's just coincidence.
    But yes, that was the trick.
    I had to make a formula so that it doesn't duplicates results, so now formula gives only results in either the first (kit+single) or the last line(single/kit).
    I made all the three formulas separately and then clubbed them, that may be the reason I used the first line for kit+single but last line for kit/single. However, it wont affect the results anyhow.

+ 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. [SOLVED] highlight cells based on multiple parts with different tolerances for each
    By TJ_IE in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-02-2014, 12:56 PM
  2. Help with Formula Referencing multiple parts at multiple points
    By Drayde in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-13-2014, 02:39 PM
  3. Help, Formula to count based on multiple criteria
    By DKerr in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-07-2013, 02:37 PM
  4. Replies: 5
    Last Post: 01-18-2013, 11:21 AM
  5. Using a COUNTIFS formula but need once of critierias to be a date...??
    By toddy1980 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-30-2012, 08:05 AM
  6. Excel 2007 : How to count based on months and parts?
    By WhieLion in forum Excel General
    Replies: 4
    Last Post: 06-15-2011, 04:52 AM
  7. Another formula to match up data depending on multiple critierias
    By Neales in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-06-2008, 10:15 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