Highlight matching rows (2 step macro)

85characters

New Member
Joined
Jul 31, 2014
Messages
5
Hi,

I have been trying unsuccessfully to create two macros in one dynamic worksheet (it changes all the time) using VBA. Ideally, macro 1 would highlight each row that has a match across columns A:D, and then macro 2 would then delete all matching rows.

So, the worksheet is entitled "Template" and it looks like this:

[table="width: 500"]
[tr]
[td]RVP[/td]
[td]DMB[/td]
[td]Banker[/td]
[td]Block Friendly Name[/td]
[td]Banking Region[/td]
[td]BadPct[/td]
[/tr]

[tr]
[td]Me[/td]
[td]Kansas[/td]
[td]Josh[/td]
[td]5 - 6 PM[/td]
[td]Hawaii[/td]
[td]0.99[/td]
[/tr]
[tr]
[td]Me[/td]
[td]Kansas[/td]
[td]Josh[/td]
[td]5 - 6 PM[/td]
[td]Texas[/td]
[td]0.2[/td]
[/tr]

[tr]
[td]Me[/td]
[td]New Jersey[/td]
[td]Sam[/td]
[td]5 - 6 PM[/td]
[td]Hawaii[/td]
[td]0.99[/td]
[/tr]
[/table]

I want macro 1 to highlight rows 1 and 2 since they match between columns A through D. Then I want macro 2 to delete matching rows, like 1 and 2, from the worksheet.

Is this possible? I could not find a forum that addressed these two specific questions.

Thank you in advance! Also, any help would be appreciated.
- 85characters
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,223,214
Messages
6,170,774
Members
452,353
Latest member
strainu

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