Can someone please help me with code in VB (Marco) to delete entire row when cell in column R is empty
Please look at example
Capture.jpg
Andrew
Can someone please help me with code in VB (Marco) to delete entire row when cell in column R is empty
Please look at example
Capture.jpg
Andrew
Last edited by andrewvt; 12-20-2011 at 06:29 AM.
Any reason why you have highlighted cells in column AR in yellow?
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
You could do a For Loop. You could write it so it says:
Please Login or Register to view this content.
Conditional formatting makes it yellow. No other reason
Code doesn't work. I'm new to VB so please help
Sorry that was example Try
Please Login or Register to view this content.
Hi Jeskit
It worked but I have to run it a couple of times before it completely remove all lines
I have it as follows
Sub Delete_Row()
Dim cell As Range
For Each cell In Range("Quotation!R21:Quotation!R105")
If cell.Value = " " Then 'if you want this to look for cell which have no values at all put if cell.value = ""
cell.EntireRow.Delete
End If
Next cell
End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks