Formula to tell which data is the latest in a list

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,347
Office Version
  1. 365
Platform
  1. Windows
Down column C I have a list of names. Down Column B I have the date the names were entered. The list will have duplicate names.

I need a formula that shows which duplicate is the latest entry. I want to use this formula in a nested formula. Basically an IF formula that says if this is the "latest Entry" then....

(No I don't want to sort. lol)




Here is the big picture of what I am trying to do:
The list of Names in column C is actually Tab Names that are added to the sheet when a Tab is imported into this workbook. When they are added, I have a Time Stamp placed next the tab name in column B. From time to Time, the user can delete a tab from the workbook and replace it with an updated version (renaming the updated version exactly the same as the one they deleted) or they can just delete a tab and not replace it. (Note: the Tab Name and Time stamp stay listed in my spreadsheet)

So down my list I want to show which tabs stills exist in the workbook, which were replaced and which were deleted.
I can easily identify which were deleted using an Indirect formula using the tab name in column C - if the formula errors I know the tab name doesn't exist in the workbook anymore.
I can tell if a Tab is still there using an Indirect as well - if it doesn't error then the Tab is in the workbook

But my hurdle is ones that been replaced. If they were replaced that means the tab name is listed one or more times in the list. I am thinking if I can identify which duplicate tab name has the latest date, then I can nest that formula into my Indirect formula. (If I am a duplicate and I have the latest Time Stamp, then do the indirect formula - if not "Replaced") which is why I need the formula to identify which of the Dups has the latest Time Stamp.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Down column C I have a list of names. Down Column B I have the date the names were entered. The list will have duplicate names.

I need a formula that shows which duplicate is the latest entry. I want to use this formula in a nested formula. Basically an IF formula that says if this is the "latest Entry" then....
If you have Office 365 then try something like
=IF(B2=MAXIFS(B$2:B$28,C$2:C$28,C2),"Latest","Not")

Otherwise, try
=IF(B2=AGGREGATE(14,6,B$2:B$28/(C$2:C$28=C2),1),"Latest","Not")
 
Upvote 0
One possible solution:


Book1
BCD
101/01/2018Sheet1Replaced
201/05/2018Sheet2Current
301/03/2018Sheet3Deleted
401/04/2018Sheet1Current
501/02/2018Sheet2Replaced
601/06/2018Sheet3Deleted
Sheet1
Cell Formulas
RangeFormula
D1=IF(IFERROR(INDIRECT($C1&"!A1"),"-")="-","Deleted",IF(COUNTIFS($C:$C,$C1,$B:$B,">="&$B1)=1,"Current","Replaced"))


WBD
 
Upvote 0
THANKS FOR THE HELP. VERY MUCH APPRECIATED

=IF(AND(COUNTIF($C:$C,$C2)>1,MAX(IF($C:$C=$C2,$B:$B))>$B2),"Tab was Replaced",IF((ISERROR(INDIRECT($C2&"!$L$3")))=FALSE,"Tab is Present","Tab was Deleted"))
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

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