Find and delete rows that contain date's that change.

msbeaudry

New Member
Joined
Oct 9, 2017
Messages
1
Trying to take a report that is copied from another program into excel and remove the unneeded data and format it into a usable format.
Code Currently using to remove Dates:

If Cell Like "Tuesday*" Or Cell Like "Monday*" Like Cell = "Wednesday*" Then
Cell.EntireRow.Delete
End If

It is not deleting anything. Does anyone know what I am missing?
Initial Format:


[TABLE="width: 1088"]
<colgroup><col span="17"></colgroup><tbody>[TR]
[TD]Transaction Count[/TD]
[TD]Scheduled In Queue[/TD]
[TD]Actual In Queue[/TD]
[TD]In Queue Variance[/TD]
[TD]In Queue Variance %[/TD]
[TD]Scheduled Out Of Queue[/TD]
[TD]Actual Out Of Queue[/TD]
[TD]Out Of Queue Variance[/TD]
[TD]Out Queue Variance %[/TD]
[TD]Total Scheduled[/TD]
[TD]Total Variance[/TD]
[TD]Total Adherence %[/TD]
[TD]Non Scheduled / In Queue Hours[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8284[/TD]
[TD]1033.3[/TD]
[TD]891.28[/TD]
[TD]142.02[/TD]
[TD]86.26%[/TD]
[TD]321.22[/TD]
[TD]280.58[/TD]
[TD]40.64[/TD]
[TD]87.35%[/TD]
[TD]1354.52[/TD]
[TD]182.66[/TD]
[TD]86.51%[/TD]
[TD]11.12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 17"]Agent, Troy [/TD]
[/TR]
[TR]
[TD]Schedule Date[/TD]
[TD]Transaction Count[/TD]
[TD]Scheduled In Queue[/TD]
[TD]Actual In Queue[/TD]
[TD]In Queue Variance[/TD]
[TD]In Queue Variance %[/TD]
[TD] [/TD]
[TD]Scheduled Out Of Queue[/TD]
[TD]Actual Out Of Queue[/TD]
[TD]Out Of Queue Variance[/TD]
[TD]Out Queue Variance %[/TD]
[TD] [/TD]
[TD]Total Scheduled[/TD]
[TD]Total Variance[/TD]
[TD]Total Adherence %[/TD]
[TD] [/TD]
[TD]Non Scheduled / In Queue Hours[/TD]
[/TR]
[TR]
[TD]Tuesday, 03 October 2017[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.00%[/TD]
[TD] [/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]100.00%[/TD]
[TD] [/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]100.00%[/TD]
[TD] [/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Wednesday, 04 October 2017[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD]0.00%[/TD]
[TD] [/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.00%[/TD]
[TD] [/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]0.00%[/TD]
[TD] [/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Thursday, 05 October 2017[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD]0.00%[/TD]
[TD] [/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.00%[/TD]
[TD] [/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]0.00%[/TD]
[TD] [/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Friday, 06 October 2017[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]2[/TD]
[TD]0.00%[/TD]
[TD] [/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.00%[/TD]
[TD] [/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]0.00%[/TD]
[TD] [/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Monday, 09 October 2017[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.00%[/TD]
[TD] [/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.00%[/TD]
[TD] [/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.00%[/TD]
[TD] [/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Subtotal:[/TD]
[TD]6[/TD]
[TD]6[/TD]
[TD]0[/TD]
[TD]6[/TD]
[TD]0.00%[/TD]
[TD] [/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]100.00%[/TD]
[TD] [/TD]
[TD]8[/TD]
[TD]6[/TD]
[TD]25.00%[/TD]
[TD] [/TD]
[TD]0


[/TD]
[/TR]
</tbody>[/TABLE]
Changed to:
[TABLE="width: 917"]
<colgroup><col><col span="13"></colgroup><tbody>[TR]
[TD]Agent Name[/TD]
[TD]Transaction Count[/TD]
[TD]Scheduled In Queue[/TD]
[TD]Actual In Queue[/TD]
[TD]In Queue Variance[/TD]
[TD]In Queue Variance %[/TD]
[TD]Scheduled Out Of Queue[/TD]
[TD]Actual Out Of Queue[/TD]
[TD]Out Of Queue Variance[/TD]
[TD]Out Queue Variance %[/TD]
[TD]Total Scheduled[/TD]
[TD]Total Variance[/TD]
[TD]Total Adherence %[/TD]
[TD]Non Scheduled / In Queue Hours[/TD]
[/TR]
[TR]
[TD]Agent, Troy [/TD]
[TD]6[/TD]
[TD]6[/TD]
[TD]0[/TD]
[TD]6[/TD]
[TD]0.00%[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]100.00%[/TD]
[TD]8[/TD]
[TD]6[/TD]
[TD]25.00%[/TD]
[TD]0



[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
This worked for me !!
Code:
[COLOR="Navy"]Sub[/COLOR] MG10Oct09
[COLOR="Navy"]Dim[/COLOR] Lst [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
Lst = Range("A" & Rows.Count).End(xlUp).Row
[COLOR="Navy"]For[/COLOR] n = Lst To 1 [COLOR="Navy"]Step[/COLOR] -1
    [COLOR="Navy"]With[/COLOR] Range("A" & n)
        [COLOR="Navy"]If[/COLOR] .Value Like "Tuesday*" Or .Value Like "Monday*" Or .Value Like "Wednesday*" [COLOR="Navy"]Then[/COLOR]
            .EntireRow.Delete
        [COLOR="Navy"]End[/COLOR] If
    [COLOR="Navy"]End[/COLOR] With
[COLOR="Navy"]Next[/COLOR] n
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,248
Members
452,623
Latest member
cliftonhandyman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top