macro to find date format in a cell and delete that entire row

V

vikram

macro to find date format in a cell and delete that entire row

i have dates in a column and date keeps changing, i want that if
macro find date in a column , it deletes that entire row

help me
thank u so much everyone for ue hel
 
D

Don Guillett

try

Sub deletedate()
For Each c In Selection
If IsDate(c) Then c.EntireRow.Delete
Next
End Sub
 
D

Don Guillett

When you say it is not working, please tell us EXACTLY (and the steps
involved) what you did to try to make it work.
 
V

vikram

i select a range

it has two columns
in the second column there are some dates which keep changing

when i run this macro, to my surprise it deletes only a few rows wit
date format and leaves a few

i have attached that sheet
thank u so much for ur hel

Attachment filename: dateproblem.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=53008
 
D

Don Guillett

then try this
Sub deltetedate1()
x = Cells(Rows.Count, "b").End(xlUp).Row
For i = x To 1 Step -1
If IsDate(Cells(i, "b")) Then Cells(i, "b").Rows.Delete
Next
End Sub
 
V

vikram

thank u so much sir
i really appreciate ur help
it worked like a beauty

thank u so muc
 
V

vikram

but sir it is deleting rows in column B only, I want thet entire ro
gets deleted


thank
 
Top