Delete row if data in column B is in column A
Closed
nashy
-
Nov 23, 2010 at 11:05 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 25, 2010 at 10:27 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 25, 2010 at 10:27 AM
Related:
- Delete row if data in column B is in column A
- How to delete a row in a table in word - Guide
- Display two columns in data validation list but return only one - Guide
- Saints row 2 cheats - Guide
- Delete my whatsapp account without app - Guide
- Tmobile data check - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Nov 25, 2010 at 10:27 AM
Nov 25, 2010 at 10:27 AM
Hi Nashy,
Put column B under column A and sort your data alphabetically.
Then use this code:
Now sort your data again to leave out the blank cells.
Best regards,
Trowa
Put column B under column A and sort your data alphabetically.
Then use this code:
Sub test() Set MR = Range("A1:A9000") For Each cell In MR If cell.Value = cell.Offset(1, 0).Value Then Range(cell, cell.Offset(1, 0)).ClearContents Next End Sub
Now sort your data again to leave out the blank cells.
Best regards,
Trowa