On Aug 6, 9:10*am, Ty wrote:
I posted a problem under "Excel Delete VB Macro" in the microsoft.*
public.*excel.*worksheet.*functions. *And another one called VLOOKUP
in the last 5 days. *All of the problems were resolved. *i have 3 more
questions.
What if *I just wanted to delete rows that have the cell blank?
my answer: *ActiveCell.Interior.Color = RGB(255, 0, 0) *need to
change
the RGB to the empty cell numbers(0, 0, 0)
What if *I just wanted to delete rows that have #N/A in the cell
blank?
my answer: *ActiveCell = #N/A
What if I had another column such as column J as a condition to the
above to not delete with my initials like TB?
my answer: If ActiveCell.Interior.Color = RGB(255, 0, 0) + column J
is
blank. *Don't really have answer but I'm trying to figure this out on
my own.
Thanks for your help....
Ty
I attempted to do one of my answers up top and if failed with an
error. Changed it to ActiveCell.Value = "#N/A". Now, I have an error
and the Do While line is yellow. The "active cell error 2042"
displays when I put my cursor over the [Do While ActiveCell < ""]
line. Here is the complete Macro:
Sub MacroTy()
'
' MacroTy Macro
' Macro recorded 7/30/2009 by Ty
'
'
ScreenUpdating = False
FirstItem = ActiveCell.Value
SecondItem = ActiveCell.Offset(1, 0).Value
Offsetcount = 1
Do While ActiveCell < ""
If ActiveCell.Value = "#N/A" Then
ActiveCell.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
ScreenUpdating = True
End Sub
Help?
Thanks...