LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default AutoFilter Confusion (no records found)

I am having soem problems figuring out how to tackle a problem. I have been
successful in [1] autofiltering a spreadsheet; [2] selecting the filtered
data and [3] copying it to a new sheet where I further manipulate it.

However, I have found that when my autofilter finds no appropriate data (no
record between two dates) instead of getting zero records I instead get all
of the data copied.

Can someone shed light on this and point me in the proper direction? Here
is part of my selection and copy process:
dLrow = Cells(Rows.Count, "P").End(xlUp).Row
'Field:=16 is Column P(card expiration date), D(last name, C(first name)
Selection.AutoFilter Field:=16, Criteria1:="=" & startFilter,
Operator:=xlAnd _
, Criteria2:="<" & endFilter
Range("D3:D" & dLrow & ",E3:E" & dLrow & ",P3:P" & dLrow).Select
Selection.Copy
Workbooks.Add
Range("A2").Select
ActiveSheet.Paste

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
In Excel, How do I get AutoFilter to provide# of records found? DougD Excel Discussion (Misc queries) 1 June 19th 08 07:51 PM
AutoFilter - How to determine number of records found JRB Excel Programming 3 November 3rd 06 12:51 PM
Counter for records found during Find excelnut1954 Excel Programming 3 March 21st 06 11:22 PM
How to "Capture" Records Found Number During AutoFilter Paputxi Excel Programming 2 March 21st 06 02:43 AM
how do I display filtered records found Pat Excel Discussion (Misc queries) 1 December 29th 05 02:34 PM


All times are GMT +1. The time now is 11:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"