Thread: [Solved] Removing secondary entries
View Single Post
 
Old 07-16-2011, 07:17 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi atilla,

Try replacing:
Code:
    If CDate(.Range("B" & i).Value) < CDate("7:00:00") Then
      .Range("A" & i).EntireRow.Delete
    End If
    If CDate(.Range("B" & i).Value) > CDate("18:00:00") Then
      .Range("A" & i).EntireRow.Delete
    End If
with:
Code:
    If CDate(.Range("B" & i).Value) > CDate("7:00:00") Then
      If CDate(.Range("B" & i).Value) < CDate("18:00:00") Then
        .Range("A" & i).EntireRow.Delete
      End If
    End If
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote