Hello,
I want to delete all rows if column N reads "NULL". I was given the last two lines of this macro a while back from someone (I believe from this forum) and it has worked in the past. I applied this to my current macro but I am getting a debug error when I get to the last 2 lines. Can someone help me?
Dim UsdRws As Long
UsdRws = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Range("N2").Select
ActiveCell.FormulaR1C1 = _
"=IF(AND(RC[-6]=""Released"",RC[-2]=""PAID"",RC[-1]=""PAID""),""Null"",""Keep"")"
Range("n2:n" & UsdRws).FillDown
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("N:N").Replace What:="Null", Replacement:="#N/A", LookAt:=xlWhole, MatchCase:=False
Columns("N:N").SpecialCells(xlCellTypeConstants, xlErrors).EntireRow.Delete
I want to delete all rows if column N reads "NULL". I was given the last two lines of this macro a while back from someone (I believe from this forum) and it has worked in the past. I applied this to my current macro but I am getting a debug error when I get to the last 2 lines. Can someone help me?
Dim UsdRws As Long
UsdRws = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Range("N2").Select
ActiveCell.FormulaR1C1 = _
"=IF(AND(RC[-6]=""Released"",RC[-2]=""PAID"",RC[-1]=""PAID""),""Null"",""Keep"")"
Range("n2:n" & UsdRws).FillDown
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("N:N").Replace What:="Null", Replacement:="#N/A", LookAt:=xlWhole, MatchCase:=False
Columns("N:N").SpecialCells(xlCellTypeConstants, xlErrors).EntireRow.Delete