Hello all,
I have a macro that deletes duplicate versions of a work number. The macro runs but when it goes to deletes the data it doesnt delete the data in columns A (Proper/Error) & B (Local District).
Column AI (Rank) has the formula of =HLOOKUP(K2,$AK$1:$AN$2,2,0) that refers to column K (Revision Status). The revision status is given a rank based on a table. The reason is that when duplicate revisions are encountered it will keep the highest ranked revision. A rank of 1 is the lowest and 4 being the highest.
Table:
[TABLE="width: 192"]
<TBODY>[TR]
[TD="width: 64, bgcolor: transparent"]Initiate
[/TD]
[TD="width: 64, bgcolor: transparent"]Working
[/TD]
[TD="width: 64, bgcolor: transparent"]Approved
[/TD]
[TD="width: 64, bgcolor: transparent"]Official
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[TD="bgcolor: transparent, align: right"]2
[/TD]
[TD="bgcolor: transparent, align: right"]3
[/TD]
[TD="bgcolor: transparent, align: right"]4
[/TD]
[/TR]
</TBODY>[/TABLE]
[TABLE="width: 2411"]
<TBODY>[TR]
[TD]Proper/Error </SPAN>
[/TD]
[TD]Local District</SPAN>
[/TD]
[TD]Work Number</SPAN>
[/TD]
[TD]WN Status</SPAN>
[/TD]
[TD]WN Type</SPAN>
[/TD]
[TD]WR Class</SPAN>
[/TD]
[TD]Area</SPAN>
[/TD]
[TD]Version</SPAN>
[/TD]
[TD]WR hist Rev #</SPAN>
[/TD]
[TD]Official Version?</SPAN>
[/TD]
[TD]Revision Status</SPAN>
[/TD]
[TD]ID</SPAN>
[/TD]
[TD]CU Location Status</SPAN>
[/TD]
[TD]CU Dsgn Action</SPAN>
[/TD]
[TD]Dsgn QTY</SPAN>
[/TD]
[TD]CU AB Action</SPAN>
[/TD]
[TD]AB QTY</SPAN>
[/TD]
[TD]AB Addition Y/N</SPAN>
[/TD]
[TD]Dsgn #</SPAN>
[/TD]
[TD]AB #</SPAN>
[/TD]
[TD]CU Completion Accept</SPAN>
[/TD]
[TD]Asset #</SPAN>
[/TD]
[TD]Serial Number</SPAN>
[/TD]
[TD]Facility Type</SPAN>
[/TD]
[TD]Address</SPAN>
[/TD]
[TD]Date of Location Status Change</SPAN>
[/TD]
[TD]WN Entry Date</SPAN>
[/TD]
[TD]Updated By</SPAN>
[/TD]
[TD]Selection Completed By</SPAN>
[/TD]
[TD]Selection Entry Date</SPAN>
[/TD]
[TD]Scheduling </SPAN>
[/TD]
[TD]Scheduling </SPAN>
[/TD]
[TD]As Built </SPAN>
[/TD]
[TD]As Built</SPAN>
[/TD]
[TD]Rank</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Design</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1859500</SPAN>
[/TD]
[TD]1859500</SPAN>
[/TD]
[TD][/TD]
[TD]12551</SPAN>
[/TD]
[TD]591229</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]5</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1859511</SPAN>
[/TD]
[TD]1859511</SPAN>
[/TD]
[TD][/TD]
[TD]12555</SPAN>
[/TD]
[TD]591028</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]9</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD][/TD]
[TD]12544</SPAN>
[/TD]
[TD]589053</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]8</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD][/TD]
[TD]26447</SPAN>
[/TD]
[TD]642990</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]5</SPAN>
[/TD]
[TD]2</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859511</SPAN>
[/TD]
[TD]1859511</SPAN>
[/TD]
[TD][/TD]
[TD]12555</SPAN>
[/TD]
[TD]591028</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]8</SPAN>
[/TD]
[TD]2</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD][/TD]
[TD]26447</SPAN>
[/TD]
[TD]642990</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]9</SPAN>
[/TD]
[TD]2</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD][/TD]
[TD]12544</SPAN>
[/TD]
[TD]589053</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]2</SPAN>
[/TD]
[TD]3</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859511</SPAN>
[/TD]
[TD]1859511</SPAN>
[/TD]
[TD][/TD]
[TD]12555</SPAN>
[/TD]
[TD]591028</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]5</SPAN>
[/TD]
[TD]3</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD][/TD]
[TD]26447</SPAN>
[/TD]
[TD]642990</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]6</SPAN>
[/TD]
[TD]3</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD][/TD]
[TD]12544</SPAN>
[/TD]
[TD]589053</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]5</SPAN>
[/TD]
[TD]4</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Approved</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD]N</SPAN>
[/TD]
[TD]1859511</SPAN>
[/TD]
[TD]1859511</SPAN>
[/TD]
[TD][/TD]
[TD]12555</SPAN>
[/TD]
[TD]591028</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]8</SPAN>
[/TD]
[TD]4</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Approved</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD]N</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD][/TD]
[TD]26447</SPAN>
[/TD]
[TD]642990</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]9</SPAN>
[/TD]
[TD]4</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Approved</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD]N</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD][/TD]
[TD]12544</SPAN>
[/TD]
[TD]589053</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3</SPAN>
[/TD]
[/TR]
</TBODY>[/TABLE]
There will be thousands of lines of data. When the macro is run it needs to delete revisions 1,2, 3 but keep revision 4 in this example. Also the macro should not affect the other data unless it follows this example. The script does this but it doesn't delete the data in columns A & B.
Any suggestions are welcome, Thanks
I have a macro that deletes duplicate versions of a work number. The macro runs but when it goes to deletes the data it doesnt delete the data in columns A (Proper/Error) & B (Local District).
Column AI (Rank) has the formula of =HLOOKUP(K2,$AK$1:$AN$2,2,0) that refers to column K (Revision Status). The revision status is given a rank based on a table. The reason is that when duplicate revisions are encountered it will keep the highest ranked revision. A rank of 1 is the lowest and 4 being the highest.
Table:
[TABLE="width: 192"]
<TBODY>[TR]
[TD="width: 64, bgcolor: transparent"]Initiate
[/TD]
[TD="width: 64, bgcolor: transparent"]Working
[/TD]
[TD="width: 64, bgcolor: transparent"]Approved
[/TD]
[TD="width: 64, bgcolor: transparent"]Official
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]1
[/TD]
[TD="bgcolor: transparent, align: right"]2
[/TD]
[TD="bgcolor: transparent, align: right"]3
[/TD]
[TD="bgcolor: transparent, align: right"]4
[/TD]
[/TR]
</TBODY>[/TABLE]
[TABLE="width: 2411"]
<TBODY>[TR]
[TD]Proper/Error </SPAN>
[/TD]
[TD]Local District</SPAN>
[/TD]
[TD]Work Number</SPAN>
[/TD]
[TD]WN Status</SPAN>
[/TD]
[TD]WN Type</SPAN>
[/TD]
[TD]WR Class</SPAN>
[/TD]
[TD]Area</SPAN>
[/TD]
[TD]Version</SPAN>
[/TD]
[TD]WR hist Rev #</SPAN>
[/TD]
[TD]Official Version?</SPAN>
[/TD]
[TD]Revision Status</SPAN>
[/TD]
[TD]ID</SPAN>
[/TD]
[TD]CU Location Status</SPAN>
[/TD]
[TD]CU Dsgn Action</SPAN>
[/TD]
[TD]Dsgn QTY</SPAN>
[/TD]
[TD]CU AB Action</SPAN>
[/TD]
[TD]AB QTY</SPAN>
[/TD]
[TD]AB Addition Y/N</SPAN>
[/TD]
[TD]Dsgn #</SPAN>
[/TD]
[TD]AB #</SPAN>
[/TD]
[TD]CU Completion Accept</SPAN>
[/TD]
[TD]Asset #</SPAN>
[/TD]
[TD]Serial Number</SPAN>
[/TD]
[TD]Facility Type</SPAN>
[/TD]
[TD]Address</SPAN>
[/TD]
[TD]Date of Location Status Change</SPAN>
[/TD]
[TD]WN Entry Date</SPAN>
[/TD]
[TD]Updated By</SPAN>
[/TD]
[TD]Selection Completed By</SPAN>
[/TD]
[TD]Selection Entry Date</SPAN>
[/TD]
[TD]Scheduling </SPAN>
[/TD]
[TD]Scheduling </SPAN>
[/TD]
[TD]As Built </SPAN>
[/TD]
[TD]As Built</SPAN>
[/TD]
[TD]Rank</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Design</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1859500</SPAN>
[/TD]
[TD]1859500</SPAN>
[/TD]
[TD][/TD]
[TD]12551</SPAN>
[/TD]
[TD]591229</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]5</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1859511</SPAN>
[/TD]
[TD]1859511</SPAN>
[/TD]
[TD][/TD]
[TD]12555</SPAN>
[/TD]
[TD]591028</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]9</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD][/TD]
[TD]12544</SPAN>
[/TD]
[TD]589053</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]8</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD][/TD]
[TD]26447</SPAN>
[/TD]
[TD]642990</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]5</SPAN>
[/TD]
[TD]2</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859511</SPAN>
[/TD]
[TD]1859511</SPAN>
[/TD]
[TD][/TD]
[TD]12555</SPAN>
[/TD]
[TD]591028</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]8</SPAN>
[/TD]
[TD]2</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD][/TD]
[TD]26447</SPAN>
[/TD]
[TD]642990</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]9</SPAN>
[/TD]
[TD]2</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD][/TD]
[TD]12544</SPAN>
[/TD]
[TD]589053</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]2</SPAN>
[/TD]
[TD]3</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859511</SPAN>
[/TD]
[TD]1859511</SPAN>
[/TD]
[TD][/TD]
[TD]12555</SPAN>
[/TD]
[TD]591028</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]5</SPAN>
[/TD]
[TD]3</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD][/TD]
[TD]26447</SPAN>
[/TD]
[TD]642990</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]6</SPAN>
[/TD]
[TD]3</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Working</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]N</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD][/TD]
[TD]12544</SPAN>
[/TD]
[TD]589053</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]5</SPAN>
[/TD]
[TD]4</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Approved</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD]N</SPAN>
[/TD]
[TD]1859511</SPAN>
[/TD]
[TD]1859511</SPAN>
[/TD]
[TD][/TD]
[TD]12555</SPAN>
[/TD]
[TD]591028</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]8</SPAN>
[/TD]
[TD]4</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Approved</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD]N</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD]1859528</SPAN>
[/TD]
[TD][/TD]
[TD]26447</SPAN>
[/TD]
[TD]642990</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3</SPAN>
[/TD]
[/TR]
[TR]
[TD]Proper</SPAN>
[/TD]
[TD]E1</SPAN>
[/TD]
[TD]2228124</SPAN>
[/TD]
[TD]SCH</SPAN>
[/TD]
[TD]E_EO</SPAN>
[/TD]
[TD]OH</SPAN>
[/TD]
[TD]9</SPAN>
[/TD]
[TD]4</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Approved</SPAN>
[/TD]
[TD]OP451</SPAN>
[/TD]
[TD]Proposed</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]1</SPAN>
[/TD]
[TD]N</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD]1859534</SPAN>
[/TD]
[TD][/TD]
[TD]12544</SPAN>
[/TD]
[TD]589053</SPAN>
[/TD]
[TD]Structure</SPAN>
[/TD]
[TD]123 Main St</SPAN>
[/TD]
[TD]10/10/14</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD]Name</SPAN>
[/TD]
[TD]10/02/14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]3</SPAN>
[/TD]
[/TR]
</TBODY>[/TABLE]
Code:
Sub keep_highest()
Dim k As Object, a, al As Long
Set k = CreateObject("Scripting.dictionary")
a = Sheets("sheet1").Cells(1).CurrentRegion
For al = 2 To UBound(a)
If a(al, 8) > k(a(al, 1)) Then k(a(al, 1)) = a(al, 8)
Next al
For al = UBound(a) To 2 Step -1
If a(al, 8) <> k(a(al, 1)) Then Cells(al, 1).Resize(, UBound(a, 2)).Delete xlUp
Next al
End Sub
Any suggestions are welcome, Thanks