killbill
02-06-2014, 08:40 AM
I am looking for a macro that delete a row if cell in column B is empty.
Thank you.
Greetings KillBill,
I see that you just joined vbaexpress :-) Welcome here!
For your current issue, try SpecialCells...
Option Explicit
Sub exampple()
Me.Range("B:B").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
PLease note that I used code within the Worksheet's module; thus - the Me keyword. Presuming your code is within a Standard Module, you will want to set an explicit reference to the range differently. As long as the sheet is going to remain in existence, I would suggest the sheet's CodeName.
Hope that helps,
Mark
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.