jarvishere
New Member
- Joined
- Mar 15, 2018
- Messages
- 1
I need to vlookup a set of information from one spreadsheet. Problem I am having is the table array which i am selecting has multiple records with same unique value I am using. I want to get the data with the latest datetimestamp. The dataset is not massively big but has close to 200K rows. Example below:
Master data with duplicate records
[TABLE="width: 325"]
<tbody>[TR]
[TD][TABLE="width: 325"]
<tbody>[TR]
[TD]unique_id[/TD]
[TD]name[/TD]
[TD]end_date[/TD]
[/TR]
[TR]
[TD]ABCDE[/TD]
[TD]John[/TD]
[TD="align: right"]31/08/2014 00:00[/TD]
[/TR]
[TR]
[TD]ABCDE[/TD]
[TD]John[/TD]
[TD="align: right"]31/08/2014 00:00[/TD]
[/TR]
[TR]
[TD]ABCDE[/TD]
[TD]John[/TD]
[TD="align: right"]31/08/2017 00:00[/TD]
[/TR]
[TR]
[TD]ABCDE[/TD]
[TD]John[/TD]
[TD="align: right"]31/08/2018 00:00[/TD]
[/TR]
[TR]
[TD]BCDE[/TD]
[TD]Kelly[/TD]
[TD="align: right"]01/09/2018 00:00[/TD]
[/TR]
[TR]
[TD]BCDE[/TD]
[TD]Kelly[/TD]
[TD="align: right"]01/01/2017 00:00[/TD]
[/TR]
[TR]
[TD]CEE[/TD]
[TD]Foo[/TD]
[TD="align: right"]31/08/2015 00:00[/TD]
[/TR]
[TR]
[TD]CEEFFF[/TD]
[TD]Bar[/TD]
[TD="align: right"]31/03/2019 00:00[/TD]
[/TR]
[TR]
[TD]CEEFFF[/TD]
[TD]Bar[/TD]
[TD="align: right"]31/08/2018 00:00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]unique_id[/TD]
[TD]name[/TD]
[TD]end_date(MAX)[/TD]
[/TR]
[TR]
[TD]ABCDE[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]BCDE[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]CEE[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]CEEFFF[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Master data with duplicate records
[TABLE="width: 325"]
<tbody>[TR]
[TD][TABLE="width: 325"]
<tbody>[TR]
[TD]unique_id[/TD]
[TD]name[/TD]
[TD]end_date[/TD]
[/TR]
[TR]
[TD]ABCDE[/TD]
[TD]John[/TD]
[TD="align: right"]31/08/2014 00:00[/TD]
[/TR]
[TR]
[TD]ABCDE[/TD]
[TD]John[/TD]
[TD="align: right"]31/08/2014 00:00[/TD]
[/TR]
[TR]
[TD]ABCDE[/TD]
[TD]John[/TD]
[TD="align: right"]31/08/2017 00:00[/TD]
[/TR]
[TR]
[TD]ABCDE[/TD]
[TD]John[/TD]
[TD="align: right"]31/08/2018 00:00[/TD]
[/TR]
[TR]
[TD]BCDE[/TD]
[TD]Kelly[/TD]
[TD="align: right"]01/09/2018 00:00[/TD]
[/TR]
[TR]
[TD]BCDE[/TD]
[TD]Kelly[/TD]
[TD="align: right"]01/01/2017 00:00[/TD]
[/TR]
[TR]
[TD]CEE[/TD]
[TD]Foo[/TD]
[TD="align: right"]31/08/2015 00:00[/TD]
[/TR]
[TR]
[TD]CEEFFF[/TD]
[TD]Bar[/TD]
[TD="align: right"]31/03/2019 00:00[/TD]
[/TR]
[TR]
[TD]CEEFFF[/TD]
[TD]Bar[/TD]
[TD="align: right"]31/08/2018 00:00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]unique_id[/TD]
[TD]name[/TD]
[TD]end_date(MAX)[/TD]
[/TR]
[TR]
[TD]ABCDE[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]BCDE[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]CEE[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]CEEFFF[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]