Deleting duplicate rows, but only after a certain point.

zookeepertx

Well-known Member
Joined
May 27, 2011
Messages
589
Office Version
  1. 365
Platform
  1. Windows
Hi there,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I have a report that has 2 sections: Rejected Records & Complete File. The Rejected Records not only show up in their own section, but are duplicated in the Complete File, as well. I need to delete the entire row of each Reject from the Complete section, but they’re scattered throughout. Can someone tell me how to add code to my macro that will delete ONLY those Reject rows that are in the Complete section? I'll show a bit of the first 2 columns below.
<o:p></o:p>
Also, the row in blue that says “Click here to view….” is a link on the report. Can I get the macro to clear just that cell? It’s the only link anywhere on the report.

Thanks!<o:p></o:p>
<o:p></o:p>
<o:p><TABLE style="WIDTH: 343pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=457 border=0 x:str><COLGROUP><COL style="WIDTH: 42pt" width=56><COL style="WIDTH: 301pt; mso-width-source: userset; mso-width-alt: 17109" width=401><TBODY><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 42pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" width=56 height=14></TD><TD class=xl28 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 301pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: white" width=401></TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl29 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white">Rejected Records</TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl25 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: silver">Reason for Reject</TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl26 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: #d4d0c8; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: silver"></TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white" x:str="Receiver Number does not exist in the system. ">Receiver Number does not exist in the system. </TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white" x:str="Receiver Number does not exist in the system. ">Receiver Number does not exist in the system. </TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white" x:str="Receiver Number does not exist in the system. ">Receiver Number does not exist in the system. </TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white" x:str="Receiver Number does not exist in the system. ">Receiver Number does not exist in the system. </TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white" x:str="Receiver Number does not exist in the system. ">Receiver Number does not exist in the system. </TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white" x:str="Receiver Number does not exist in the system. ">Receiver Number does not exist in the system. </TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl30 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: black; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: white"></TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl31 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: white">Click here to view rejected records in excel format.</TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl28 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: white"></TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl28 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: white"></TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl29 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white">Complete File</TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl25 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: silver">Reason for Reject</TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl26 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: #d4d0c8; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: silver"></TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white"></TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white" x:str="Receiver Number does not exist in the system. ">Receiver Number does not exist in the system. </TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white" x:str="Receiver Number does not exist in the system. ">Receiver Number does not exist in the system. </TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white"></TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white"></TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white"></TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white"></TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white"></TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white"></TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white" x:str="Receiver Number does not exist in the system. ">Receiver Number does not exist in the system. </TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white"></TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white" x:str="Receiver Number does not exist in the system. ">Receiver Number does not exist in the system. </TD></TR><TR style="HEIGHT: 10.5pt" height=14><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; HEIGHT: 10.5pt; BACKGROUND-COLOR: white" height=14></TD><TD class=xl27 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black; BORDER-LEFT: black 0.5pt solid; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: white" x:str="Receiver Number does not exist in the system. ">Receiver Number does not exist in the system. </TD></TR></TBODY></TABLE></o:p>
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Bump.

I got the cell with the link to clear. Any help on the other problem?
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,357
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top