Can someone please help program a conditional script that will delete entire row if column B is empty?
Thanks in advance!
Can someone please help program a conditional script that will delete entire row if column B is empty?
Thanks in advance!
Last edited by Rabbitstew; 07-17-2012 at 01:29 PM. Reason: Correction
Hello Rabbitstew,
This will delete row 10 on the ActiveSheet if A2 contains no data.
![]()
If Range("A2") ="" Then Rows(10).EntireRow.Delete
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Ooops, sorry I meant to say if Column B is empty then delete the entire row
Never mind, I got it:
Sub DelRow()
Range("B:B").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
Thanks anyway!
Hello Rabbitstew,
Do you want to delete a row if the cell in column "B" of that row is empty?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks