Excel formula to Identify the latest date from each order

maximusben

New Member
Joined
Jul 13, 2020
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
Hi all,
I am seeking help with Excel. I have a datasheet with orders that may have multiple dates, and the latest (most recent) date will always be on the first line of each order. On each order number, I need to identify the first line with the latest date with a number 1, and the other lines for that order with a zero. For example, on the table below, I have 2 orders, one with 2 lines, and the other with 4 lines. Order 123456 has the latest date of 7/1/2020, so a number one needs to be shown for this line, and a zero for the other lines. Same logic applies to the other order. My data sheet may have thousands of orders. Please note that the latest date will always be on the first line of each order.Can you please help me with this Excel formula?

Thank you!

Order NoDate UpdatedLogic
123456​
7/1/2020​
1​
123456​
5/31/2020​
0​
789012​
7/10/2020​
1​
789012​
1/1/2020​
0​
789012​
10/21/2018​
0​
789012​
5/12/2016​
0​
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Welcome to MrExcel!

How about:

Book2
ABC
1Order NoDate UpdatedLogic
21234567/1/20201
31234565/31/20200
47890127/10/20201
57890121/1/20200
678901210/21/20180
77890125/12/20160
Sheet6
Cell Formulas
RangeFormula
C2:C7C2=IF(COUNTIF(A$2:A2,A2)=1,1,0)
 
Upvote 0
Thank you so much for your speedy response Eric. Just what I was looking for. I appreciate the help!
Regards,
maximusben
 
Upvote 0

Forum statistics

Threads
1,215,007
Messages
6,122,670
Members
449,091
Latest member
peppernaut

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