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
Bookmarks