Hi,
I am looking for a macro to check my data for consistency and completeness. Every couple of weeks I get a file with several hundreds to a thousand lines. Cells in the file contain document names, each cell may hold up to 16 document names. Document names differ at the fourth position from the right indicating a series of documents (e.g. L vs R or 0 vs 1 vs 2). Each series may consist of several duplicates indicated by the last two digits of the document number (e.g. ...-L-01 up to ...-L-04). Document names in cells are separated by line breaks. See attached sample file or below:
623-M-AB-200003-02-1-L-01
623-M-AB-200003-02-1-L-02
623-M-AB-200003-02-1-R-01
623-M-AB-200003-02-1-R-02
What I would like the macro to be able to do is a bit tricky:
1) for each duplicate of an L-series there should be a corresponding duplicate of an R-series (if there is ...-L-03, there must also be a document ...-R-03). Same holds for document series 1 vs. 2.
2) the macro should identify the highest duplicate number in a cell and check that all duplicates with a lower number exist in that cell (if there is ...-1-04, there must be ...-1-03, ...-1-02, ...-1-01 duplicates)
3) If any of the above checks results in FALSE, write FALSE into the cell in the column next to it or better still,...
4) ... put the names of the missing documents into the cell next to the one being checked
5) If any of the document names in a cell does differ in the digits up the the slash indicating the series, put a FALSE or the document name in an output cell two colums to the right.
To me this is impossible. But I would appreciate even a solution to parts of the problem.
Bookmarks