![]() |
|
#1
|
||||
|
||||
![]()
Maybe this:
Code:
Option Explicit Sub ChrisOK() Dim i As Long, lr As Long lr = Range("A" & Rows.Count).End(xlUp).Row Application.ScreenUpdating = False For i = lr To 1 Step -1 If Range("C" & i) = "" Then Range("C" & i).EntireRow.Delete ElseIf Range("D" & i) = "#VALUE" Then Range("D" & i).EntireRow.Delete End If Next i Application.ScreenUpdating = True MsgBox ("Complete") End Sub |
#2
|
|||
|
|||
![]() Quote:
I would use Alan's code, but with one modification of the first "If" statement: If Range("C" & i) = "" And Range("A" & i) <> "" Then |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
vjvj123 | Word VBA | 12 | 09-27-2018 03:09 PM |
![]() |
kevinbradley57 | Excel Programming | 2 | 04-17-2018 08:40 AM |
![]() |
FUGMAN | Excel Programming | 7 | 02-05-2017 08:37 AM |
![]() |
dwirony | Word VBA | 2 | 10-20-2016 01:31 PM |
How can I delete the content of a cell in column if the cell value is more than 1000? | Learner7 | Excel | 2 | 06-27-2011 05:44 AM |