How to find 1st instance, 2nd Instance for a unique ID based on date

Kiatsu

New Member
Joined
Mar 8, 2018
Messages
3
I have the following table sample. I need to indicate in the Shipment column,the first time something with the unique ID , the 2nd.. etc. it has to be based on date and not location in the sheet. And if the ID does not repeat then it is the 1st shipment.

IDShip Date RepeatShipment
AST897P10/4/2017No1st
AST108711/7/2017Yes1st
AST108711/23/2017Yes
GRP91112/10/2017No
GRP79510/27/2017No
BHY90210/27/2017Yes2nd
BHY90211/22/2017Yes3rd
BHY9029/25/2017Yes 1st
GYT2149/25/2017No

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
try:

<b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">D2</th><td style="text-align:left">=COUNTIFS(<font color="Blue">A$2:A$10,A2,B$2:B$10,"<"&$B2</font>)+1</td></tr></tbody></table></td></tr></table><br />


Excel 2013/2016
ABCD
1IDShip DateRepeatShipment
2AST897P10/4/2017No1
3AST108711/7/2017Yes1
4AST108711/23/2017Yes2
5GRP91112/10/2017No1
6GRP79510/27/2017No1
7BHY90210/27/2017Yes2
8BHY90211/22/2017Yes3
9BHY9029/25/2017Yes1
10GYT2149/25/2017No1
Sheet1
 
Upvote 0
Use SUMPRODUCT like this:


Book1
ABCD
1IDShip DateRepeatShipment
2AST897P10/4/2017No1
3AST108711/7/2017Yes1
4AST108711/23/2017Yes2
5GRP91112/10/2017No1
6GRP79510/27/2017No1
7BHY90210/27/2017Yes2
8BHY90211/22/2017Yes3
9BHY9029/25/2017Yes1
10GYT2149/25/2017No1
Sheet2
Cell Formulas
RangeFormula
D2=1+SUMPRODUCT(($A$2:$A$10=$A2)*($B$2:$B$10<$B2))


WBD
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top