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:


Transaction CountScheduled In QueueActual In QueueIn Queue VarianceIn Queue Variance %Scheduled Out Of QueueActual Out Of QueueOut Of Queue VarianceOut Queue Variance %Total ScheduledTotal VarianceTotal Adherence %Non Scheduled / In Queue Hours
82841033.3891.28142.0286.26%321.22280.5840.6487.35%1354.52182.6686.51%11.12
Agent, Troy
Schedule DateTransaction CountScheduled In QueueActual In QueueIn Queue VarianceIn Queue Variance % Scheduled Out Of QueueActual Out Of QueueOut Of Queue VarianceOut Queue Variance % Total ScheduledTotal VarianceTotal Adherence % Non Scheduled / In Queue Hours
Tuesday, 03 October 201710000.00% 220100.00% 20100.00% 0
Wednesday, 04 October 201712020.00% 0000.00% 220.00% 0
Thursday, 05 October 201732020.00% 0000.00% 220.00% 0
Friday, 06 October 201712020.00% 0000.00% 220.00% 0
Monday, 09 October 201700000.00% 0000.00% 000.00% 0
Subtotal:66060.00% 220100.00% 8625.00% 0



<colgroup><col span="17"></colgroup><tbody>
</tbody>
Changed to:
Agent NameTransaction CountScheduled In QueueActual In QueueIn Queue VarianceIn Queue Variance %Scheduled Out Of QueueActual Out Of QueueOut Of Queue VarianceOut Queue Variance %Total ScheduledTotal VarianceTotal Adherence %Non Scheduled / In Queue Hours
Agent, Troy 66060.00%220100.00%8625.00%0




<colgroup><col><col span="13"></colgroup><tbody>
</tbody>
 

Some videos you may like

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

MickG

MrExcel MVP
Joined
Jan 9, 2008
Messages
14,841
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
 

Watch MrExcel Video

Forum statistics

Threads
1,127,025
Messages
5,622,276
Members
415,890
Latest member
Apopolis

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
Top