pipoliveira
New Member
Dear All,
I hope you are all well.
I have a table to update employees Out Of Office. That table have 3 columns, the first for the employee name, the second is to maintain the date "from" and the 3rd to maintain the date as "To".
I wrote a code to auto delete the rows content where the date in the 3rd column is past.
The code I have is the following:
Now the problem I have is within the table.
Each column have 2 merged cells and I think that's why I am having an error with the code as it mentions that cannot delete merged files.
I cannot use single cells as the sheet I have the code contains several tables on top and beside this one.
Any ideas on how to postpone this error?
Your assistance on this matter will be highly appreciated.
Best regards,
Filipe
I hope you are all well.
I have a table to update employees Out Of Office. That table have 3 columns, the first for the employee name, the second is to maintain the date "from" and the 3rd to maintain the date as "To".
I wrote a code to auto delete the rows content where the date in the 3rd column is past.
The code I have is the following:
Code:
Private Sub Worksheet_Activate()
With Range("I42:N" & Cells(Rows.Count, 4).End(xlUp).Row)
.AutoFilter Field:=3, Criteria1:="<" & CLng(Date), Operator:=xlAnd
.Offset(1).ClearContents
.AutoFilter
End With
End Sub
Now the problem I have is within the table.
Each column have 2 merged cells and I think that's why I am having an error with the code as it mentions that cannot delete merged files.
I cannot use single cells as the sheet I have the code contains several tables on top and beside this one.
Any ideas on how to postpone this error?
Your assistance on this matter will be highly appreciated.
Best regards,
Filipe