I have the following columns in an excel sheet in Excel 2010:
Batch Number BatchID END TIME
120319-0001 120319-0001_TEST1 3/20/12 13:44
120319-0001 120319-0001_TEST2 3/20/12 10:05
120319-0002 120319-0002_TEST1 3/20/12 14:40
120319-0002 120319-0002_TEST2 3/20/12 12:46
120319-0003 120319-0003_TEST1 3/20/12 14:01
120319-0003 120319-0003_TEST2 3/20/12 12:11
120319-0004 120319-0004_TEST1 3/20/12 15:37
120319-0004 120319-0004_TEST2 3/20/12 11:59
120319-0005 120319-0005_TEST1 3/20/12 19:06
120319-0005 120319-0005_TEST2 3/20/12 11:47
I need a formula I can fill down in the 4th column that will do the following:
- Select all duplicates in column "Batch Number"
- Find Max in column "END TIME" for duplicates
- Fill 4th column with the Cell Value in Column "BatchID" on Max in "END TIME" on all duplicates
Expected output of 4th column:
120319-0001_TEST1
120319-0001_TEST1
120319-0002_TEST1
120319-0002_TEST1
120319-0003_TEST1
120319-0003_TEST1
120319-0004_TEST1
120319-0004_TEST1
120319-0005_TEST1
120319-0005_TEST1
I've tried using a combination of INDEX, MATCH, and IF statements and haven't gotten it to work yet.
I would be willing to work with a VBA/macro solution too.