Thread: macro help
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Sasikiran Sasikiran is offline
external usenet poster
 
Posts: 104
Default macro help

Thanks a ton everyone for posting your suggestions.

"Jacob Skaria" wrote:

Sasikiran

Try the below macro which works on activesheet. Col B. Backup your data and
test.

Sub Macro()
Dim lngRow As Long
Dim lngLastRow As Long
lngLastRow = ActiveSheet.Cells(Rows.Count, "B").End(xlUp).Row
For lngRow = lngLastRow To 1 Step -1
If Second(Range("B" & lngRow)) < 0 Then Rows(lngRow).Delete
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Sasikiran" wrote:

Dear,

I need a macro to delete the entire row if the seconds data in the cell is
other than 00.

The data in column B is in h:mm:ss AM/PM format. If the time is other than
00 it displays in the cell. All the rows which has seconds value other than
00 should be deleted.

Thanks in advance.