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:
![]()
for each cell in range ("") If cell.value = "" Then cell.entirerow.delete End If next cell
Code doesn't work. I'm new to VB so please help
Conditional formatting makes it yellow. No other reason
Sorry that was example Try
![]()
Dim cell as Range For each cell in range ("R:R") If cell.value = "R £0.00" Then 'if you want this to look for cell which have no values at all put if cell.value = "" cell.entirerow.delete End If Nex Cell
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