Manir,
Presuming the rest of your code works already, change :-
If Cells(i, 8) = "Current Period" Then
to: -
If Cells(i, 8) = "Current Period" OR Cells(i, 8) = "Year to Date" Then
hth,
Tim
"manfareed" <(E-Mail Removed)> wrote in message
news:3DAB4662-859E-4896-BE18-(E-Mail Removed)...
> Hi,
>
> I need to delete all rows if they contain either "Current Period" or"Year
> to
> Date" in Column H. The other Rows should move up accordingly. How do I
> change
> the code below to include "Year to Date" ???
> Next i
> For i = 2 To n
> If Cells(i, 8) = "Current Period" Then
> Cells(i + 1, 8).Resize(1, 5).Cut Cells(i, 8)
> Rows(i + 1).Delete
> End If
> Next i
>
> Thanks,
>
> Manir
|