![]() |
|
|
|
#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 |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Wish to delete letters to the right of the cursor in a Table cell, but whole cell is being deleted
|
vjvj123 | Word VBA | 12 | 09-27-2018 03:09 PM |
Fill blank cell with value from adjacent cell
|
kevinbradley57 | Excel Programming | 2 | 04-17-2018 08:40 AM |
Clear all cell colors within a range starting at cell A8 and change row of active cell to yellow
|
FUGMAN | Excel Programming | 7 | 02-05-2017 08:37 AM |
Need macro to delete a column with a blank cell
|
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 |