Hello all,
I have recently started teaching myself VBA and thus far have been somewhat successful, with a fair amount of trial and error. However, I have come to stumbling block and looking for some assistance.
The problem:
I have a set of data, columns A - L.
A B C D E F G H I J K L
NAME ID EVENT ID TASK TYPE CLASS DATE 1 DATE 2 DATE 3 DATE 4 DATE 5 DATE 6
ABC 123000 QAZ EX QWER A 01/01/2017 null null 03/01/2017 null null
DEF 456000 WSX EX ASDF A null 02/01/2017 01/01/2017 03/01/2017 null null
DEF 456000 WSX EX ASDF A null 02/01/2017 01/01/2017 09/01/2017 null null
GHI 789000 EDC EX QWER B null 02/01/2017 01/01/2017 03/01/2017 null null
JKL 321000 RFV EX QWER B null 02/01/2017 01/01/2017 03/01/2017 null null
MNO 654000 TGB EX QWER C null 02/01/2017 01/01/2017 03/01/2017 null null
MNO 654000 TGB EX QWER C null 02/01/2017 01/01/2017 03/01/2017 null null
PQR 987000 YHN EX ASDF C null 02/01/2017 01/01/2017 03/01/2017 null null
STU 321111 UJM EX ASDF C null 02/01/2017 01/01/2017 03/01/2017 null null
STU 321111 UJM EX ASDF C null 02/01/2017 01/01/2017 04/01/217 null null
VWX 654111 IKL EX ASDF A null 02/01/2017 01/01/2017 03/01/2017 null null
YZ 987111 IOP EX QWER A 01/01/2017 null null 03/01/2017 null null
YZ 987111 IOP EX QWER A 01/01/2017 null null 04/01/2017 null null
YZ 987111 IOP EX QWER A 01/01/2017 null null 03/01/2017 null null
(Apologies for the format, currently unable to upload anything - it looks fine before I post the thread, then loses all formatting!?)
I have rows that will have matching information in columns A - F, but a differing date in column J. I need code to find the rows that are matching columns A-F, but only keep the
one with the earliest date in column J, if column D contains 'EX' in it (may have other info as well, so I guess the use of a wild card here would be needed).
It may also be possible that there will be rows with exactly the same information in every column, for these only one record should be kept.
The data set is usually fairly extensive, so would need the code to continue until column A no longer has any value.
hopefully that makes sense, as always hugely appreciate any assiustance from this wonderful resource. Let me know if any clarifications are needed.
Bookmarks