Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Filter in between dates
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 |
#2
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Filter in between dates
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 |
#4
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Filter in between dates
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 |
#5
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Filter in between dates
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 |
#6
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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 |
#7
Posted to microsoft.public.excel.newusers
|
|||
|
|||
Filter in between dates
Thanks Don! Gee, I think that is VB code but didn't realize it could be
used in excel and I don't know what the heck it says but the first 100 records of your report matches my hand done version so I guess I am done with this part of the project. I was hoping it was something I could learn to do but I don't think so yet. Thanks, Linda "Don Guillett" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Filter on Dates | Excel Discussion (Misc queries) | |||
Filter Dates? | Excel Discussion (Misc queries) | |||
How to filter out all the partial dates from a big list of dates? | Excel Discussion (Misc queries) | |||
Filter dates by the day | Excel Discussion (Misc queries) | |||
how to filter dates? | New Users to Excel |