+ Reply to Thread
Results 1 to 7 of 7

Count unique values but...

  1. #1
    Registered User
    Join Date
    05-24-2019
    Location
    Slovakia
    MS-Off Ver
    2016
    Posts
    4

    Count unique values but...

    Hello,

    i need your help. In short way - i have excel file with many sheets. One of them keeps customers and their prefixes (like Lion Value = LV; Plast-oxyl = PO; Iron Auto-Cloud = IAC; etc) and primal suffix of six zeros.
    Second sheet shows delivery order (where you put material number, quantity, customers purchase order, delivery date,...) and you also put there a delivery number (following next order number for every single customer).
    For example: you know that you made 4x orders for customer Lion Value, so next filled number must be 5.
    In this sheet is also automatically generated our internal delivery order "NUM COMMANDE" (which consists from customer prefix + suffix zeros + number of next delivery. So we will get for example LV000005.
    Another sheet shows history - it means everything what was ordered in history. Example at the bottom.

    My question is - is there any formula or mix of functions which will count unique values (our internal delivery orders = NUM COMMANDE) for every customer (based on prefix) and will tell me that next delivery order must be XX.
    Example from bottom: it will count that customer with prefix LV has 4 unique orders in our history, so next delivery order number must be 5 for customer LV. If we look for customer PO, we see that we have 2 unique NUM COMMANDEs, so next delivery will be with 3 = next delivery order must have number 3.
    NOTE: I dont want to use any filter or pivot table. Maybe only macro, but prefer function/formula.

    Material Purchase Order Num Commande Delivery date Quantity
    L0676609AB01 2708/2019 LV000001 21.05.2019 30
    L0676610AB01 2708/2019 LV000001 21.05.2019 30
    L0676611AB01 2708/2019 LV000001 21.05.2019 60
    L0676612AB01 2708/2019 LV000001 21.05.2019 75
    KY3214A583AD PO4278/PO4479 PO000001 21.05.2019 18
    KY3214A583CD PO4278/PO4479 PO000001 21.05.2019 9
    KY3214A583ED PO4278/PO4479 PO000001 21.05.2019 27
    KY3214A583GD PO4278/PO4479 PO000001 21.05.2019 36
    L0676609AB01 111/3 LV000002 22.05.2019 30
    L0676610AB01 111/3 LV000002 22.05.2019 30
    KY3214A583AD PO4299/PO7155 PO000002 23.05.2019 18
    KY3214A583CD PO4299/PO7155 PO000002 23.05.2019 9
    L0676609AB01 6681/1447 LV000003 24.05.2019 30
    L0676610AB01 6681/1447 LV000003 24.05.2019 30
    L0676611AB01 6681/1447 LV000003 24.05.2019 60
    L0676612AB01 500/133 LV000004 24.05.2019 75
    L0676678AC01 14-559846 IAC000001 25.05.2019 15
    L0676702AC01 14-559846 IAC000001 25.05.2019 30
    L0676683AC01 14-559846 IAC000001 25.05.2019 30

    Thank you
    Last edited by petko; 05-24-2019 at 04:41 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Count unique values but...

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    05-24-2019
    Location
    Slovakia
    MS-Off Ver
    2016
    Posts
    4

    Re: Count unique values but...

    Hello Pepe,

    already done. I put simple file to attachment.

    Basically - I need some formula/function in sheet "Order list" in cell J5 to check history (sheet "delivered history") to check how many times we have unique values in column "Num Commande" for customer which is picked in sheet "Order list" in cell D8.
    We know that every customer has own prefix.

    I put some example data in sheet "Order list", we know that they belong to customer Lion Value. I need to fill delivery number in cell J5 but I dont want to calculate manually how many unique "Num Commande" exist in sheet "delivered history" for this customer.
    We can see that we have 4 unique "Num Commande" for customer Lion Value (with prefix LV) in sheet "delivered history". That means cell J5 (in sheet "Order list") should have number "5" (because we already have 4 numbers before + 1 new).

    I hope it is clear. If not, tell me.
    Attached Files Attached Files

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,407

    Re: Count unique values but...

    If I understand correctly please try this formula in J5
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  5. #5
    Registered User
    Join Date
    05-24-2019
    Location
    Slovakia
    MS-Off Ver
    2016
    Posts
    4

    Re: Count unique values but...

    Wow, it works perfectly.

    Many thanks !!!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: Count unique values but...

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    05-24-2019
    Location
    Slovakia
    MS-Off Ver
    2016
    Posts
    4

    Re: Count unique values but...

    Done. Thanks.

+ 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. Create a unique list with a count against the unique values
    By barber87 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-12-2017, 10:13 AM
  2. Replies: 2
    Last Post: 08-19-2015, 10:22 AM
  3. [SOLVED] Count then Delete Duplicate Values and put count next to now unique value
    By flipjarg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-12-2014, 04:22 PM
  4. [SOLVED] Unique Total Value Count per Unique Lookup Values
    By KnightVision in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-02-2014, 05:03 AM
  5. [SOLVED] count unique values based on unique values
    By neetu.aggarwal in forum Excel General
    Replies: 13
    Last Post: 10-23-2012, 04:00 AM
  6. [SOLVED] How To Count Unique Values in COL A Subject for each unique value in COL B ??
    By amirtehrani in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-06-2012, 03:00 AM
  7. Replies: 17
    Last Post: 08-24-2009, 08:58 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