Hello, I got the following formula:
Which works as intended (bonus point if you can make it even more efficient!), organising data from the Data sheet but I would like to respect all the formatting (for example, separating values that have the latest date bring and then bringing all results from that same ID (Column B) from values that don't have the latest date (that's what the blank row at row 36 is) and sorting in it but doing it with the last 4 digits of column B (at the moment is doing with all the digits, 6).
Example spreadsheet with wanted results done manually provided:
Book10.xlsx
Let me know if I didn't explained correctly or if you need any more information, thank you in advance!
Excel Formula:
=LET(src,Data, fsrc,FILTER(src,INDEX(src,,1)<>""), shortID,INDEX(fsrc,,1), dates,INDEX(fsrc,,12), maxdate,MAX(dates),
uidmd,SORT(UNIQUE(FILTER(shortID,dates=maxdate))), uidnmd,SORT(UNIQUE(VSTACK(shortID,uidmd),,1)),
utd,FILTER(fsrc,ISNUMBER(MATCH(shortID,uidmd,0))), nutd,FILTER(fsrc,NOT(ISNUMBER(MATCH(shortID,uidmd,0)))),
VSTACK(SORT(utd,{1,12},{1,-1}),EXPAND("",,COLUMNS(fsrc),""),VSTACK(SORT(nutd,{1,12},{1,-1}))))
Which works as intended (bonus point if you can make it even more efficient!), organising data from the Data sheet but I would like to respect all the formatting (for example, separating values that have the latest date bring and then bringing all results from that same ID (Column B) from values that don't have the latest date (that's what the blank row at row 36 is) and sorting in it but doing it with the last 4 digits of column B (at the moment is doing with all the digits, 6).
Example spreadsheet with wanted results done manually provided:
Book10.xlsx
Let me know if I didn't explained correctly or if you need any more information, thank you in advance!