Delete row with date in it

IrishJM

New Member
Joined
Dec 31, 2005
Messages
6
Ok Guy's and Girls
I get data sucked in to excel Column A is Product ID Col B is Product No Col C is Customer Name etc

Occasionally in Column A the first row for a new Day has that Date in it seeing as this is the only data in Column A that is a Date is it possible to delete this Row? By means of VB or Macro.

Thanks
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Maybe

Code:
Sub Delete_Date()
Dim i As Long

    For i = Cells(Rows.Count, "A").End(xlUp).Row To 1 Step -1
        If IsDate(Cells(i, "A")) Then
            Rows(i).Delete
        End If
    Next i
        
End Sub

VBA Noob
 
Upvote 0
VBA Noob thanks that works a treat if the sheet is called sheet1 what if it is calles something else like Daily Control.

Thanks
 
Upvote 0

Forum statistics

Threads
1,213,559
Messages
6,114,302
Members
448,564
Latest member
ED38

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