View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.newusers
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Filter in between dates

This should do it. File returned to OP

Sub GetReportSAS()
Application.ScreenUpdating = False
Dim dlr As Long
Dim i As Long
Dim ss As Worksheet

Set ss = Sheets("Report")
dlr = ss.Cells(Rows.Count, 1).End(xlUp).Row
ss.Rows(9).Resize(dlr - 8).Delete

With Sheets("Data")
For i = 9 To .Cells(Rows.Count, 1).End(xlUp).Row
dlr = ss.Cells(Rows.Count, 1).End(xlUp).Row + 1
If Not .Cells(i, "h") < .Cells(i, "g") And _
Not .Cells(i, "j") .Cells(i, "I") Then _
.Rows(i).Copy ss.Cells(dlr, 1)
Next i
End With
Application.ScreenUpdating = True
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Linda RQ" wrote in message
...
Just tried again....Linda


"Don Guillett" wrote in message
...
Didn't get to me

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Linda RQ" wrote in message
...
Sent....thanks


"Don Guillett" wrote in message
...
If desired, send your file to my address below. I will only look
if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Linda RQ" wrote in message
...
Hi Everyone,

Using Excel 2003. I have a list of patients who were on a particular
therapy and in a certain unit. Many where on the therapy in other
units before getting transferred or on the therapy after they left. I
need to find the patients who started on a therapy after they arrived
in a unit and who were off the therapy before they left the unit. My
Date units show me Date and Time in the same field. They are named..

PtLocStDtTm
PtLocEndDtTm
PtThpyStDtTm
PtThpyEndDtTm

Thanks,
Linda