dev646
dev646

Reputation: 419

Excel: Find first time in multiple common dates

Editing my original question as the requirement has changed:

If the source table is like below:

enter image description here

Need the result as below table:

enter image description here

Basically, remove all other data other than for each date the first occurrence of an event for the respective date.

Upvotes: 1

Views: 507

Answers (2)

dev646
dev646

Reputation: 419

Got it... Basically derived from the JvDV's answer. Step1: Add one column to find the duplicates in number column and apply the formula:

=IF(COUNTIF($A$2:$A2, $A2)>1, "Duplicate", "")

Step 2: expand the sorting first from lowest to largest number Step 3: expand the sorting second date wise from old to new and as step 3: expand sorting time-wise from old to new

Then delete the rows containing duplicates by filtering it out and remove the filter to see results.

Upvotes: 0

JvdV
JvdV

Reputation: 75900

You ask for formulas, so try these:

enter image description here

Formula in D2:

=INDEX($A$2:$A$13,MATCH(0,COUNTIF($D$1:D1,$A$2:$A$13),0))

Formula in E2:

=MIN(IF($A$2:$A$13=D2,$B$2:$B$13,""))

Drag down...

Important: Enter both formulas as array through Ctrl+Shift+Enter

Upvotes: 3

Related Questions