Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-19-2018, 06:38 AM
Pat.hooybergs Pat.hooybergs is offline delete rows by looking at the next column if they are equal Windows 7 64bit delete rows by looking at the next column if they are equal Office 2013
Novice
delete rows by looking at the next column if they are equal
 
Join Date: Mar 2018
Posts: 1
Pat.hooybergs is on a distinguished road
Default delete rows by looking at the next column if they are equal


Hello all

i am a novice but i need to created a vba to delete rows were a certain column is equal to the row above this row. And if it is another value in the cell (column) the same info.

I diid insert an exemple were the rows in yellow has to be kept and thos with no fill has to be deleted.
the column to refer too is "B". (Naam)

thx all
Attached Files
File Type: xlsx Map1.xlsx (10.6 KB, 13 views)
Reply With Quote
  #2  
Old 03-25-2018, 04:13 AM
p45cal's Avatar
p45cal p45cal is online now delete rows by looking at the next column if they are equal Windows 10 delete rows by looking at the next column if they are equal Office 2010 32bit
Expert
 
Join Date: Apr 2014
Posts: 867
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Code:
Sub Macro1()
    ActiveSheet.Range("A1").CurrentRegion.Columns("A:F").RemoveDuplicates Columns:=2, Header:=xlYes
End Sub
Although it's just as easy to use Remove Duplicates in the Data Tools section of the Data tab of the ribbon.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
delete rows by looking at the next column if they are equal Macro delete table rows if cell in first column = $ Btop Word VBA 7 02-13-2018 05:36 PM
delete rows by looking at the next column if they are equal Delete blank rows between the two rows that contain data beginner Excel Programming 5 12-26-2014 12:29 AM
delete rows by looking at the next column if they are equal Delete All empty Rows - Print - Undo all Rows deleted Bathroth Word VBA 1 10-01-2014 01:40 PM
delete rows by looking at the next column if they are equal Huge table needs to link rows and column in a special manner (when not equal to 0) melieetnala Excel 1 08-12-2014 05:56 AM
Make row in one sheet equal column of another hypertyper Excel 6 01-31-2012 03:48 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft