View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default How to pull only dates within a requested dynamic range

Why not just use ONE sheet and use datafilterautofilter
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

"Roady" wrote in message
...
Hello:
I have two tabs in a workbook. The 1st tab will be the user interface. The
2nd tab will be the database of information. Both tabs are set up with
identical column headers.

In the 1st tab, the user will select a start and end date (for a date
range)
and also a department. I want to create a macro or something whereby it
will
pull only lines of data that relate to dates that fall within that date
range
and also department.

For example, the user selects 4/18/10-4/21/10 and dept 66 on tab 1. If on
the 2nd data source tab, there is an item listed in dept 66 with a date
range
of 4/21/10-4/22/10, I would like it to still capture and pull the
information
into the 1st tab. Although the ranges don't match up exactly, the
important
thing is that there is some crossover between the date ranges so it should
be
included in the data pull.

How do I get it to pull the full line of applicable data from the 2nd tab
into the 1st tab?

Thank you! Roady