Hi,
hope this is what you want - it uses vlookup.
Regards
AS
Main Topics
Browse All TopicsHi,
I have a excel 2007 sheet with 3 columns. Column 1 is BeginDate, column 2 is EndDate and column 3 is Name.
I need to query the excel such that on any given day, I want to obtain the Names for that day. For example, say BeginDate is 24-Ago and EndDate is 03-Sep, and have people to begin work on 24 Ago, some on 27 Ago and some on 03-Sep. I need to filter only the names of the people who are working for say 27-Ago.
How do I achieve this??
hope the above was clear..
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi Skud,
Small problem with the formula. I need to obtain the names of all the people in a specific date range. For example, in the sheet you have provided, the date 25-09-2009 gives me the name John since its only John who lies in the date range 24-09-2009 to 27-09-2009.
BUT If I change the date range in the second row for Bill from 31-08-2009 to 29-09-2009, the formula still show me only John instead of Bill and John.
Can the formula be changed to reflect this?
Thanks,
Sg
Hi Sg,
new spreadsheet attached. Changed the solution to hopefully fit the requirements.
Named 2 Ranges 'DateToFind' which is the date you enter at the top, and 'DataList' which is the data table.
Added a formula to each row in column D. This simply tests whether 'DateToFind' falls into the Start-End value range in columns A & B on that line. If it does it sets the value to "Y" otherwise sets it to "N".
Set up a filter on the table.
Set up a Macro Button to basically display all lines with a "Y" in column "D".
Hope this is nearer what you want.
Hi Jack ,
A) =VLOOKUP(E4,A2:C28,3)
B) =VLOOKUP(E4,A2:C28,3,3)
C) =VLOOKUP(E4,A2:C28,3,false
A) Looks for the value in E4 in the first column of the range A2 to C28, if it finds an exact match (as the 4th operator is missing it defaults to 0 of false) it will return the value in the 3rd colum of the range for that line. If it does not find an exact match it returns #N/A.
B) Is as above, but as the 4th operator is set to 3 (in this case it appears that any value entered that is not zero gets treated as 1 or true), it will do a range lookup, selecting the highest value which does not exceed E4.
C) equates to A)
Hope this helps.
Hi Skud,
This works almost perfectly but seeing your expertise on this subject, request your help on an additional issue.
I have in a second worksheet, a list of all the names and their phone numbers. So what I really want to achieve, is by using the filter, list the names and their respective phone numbers for the given date...
Trust this is probably a simple alteration but would appreciate your help!
Thanks a lot!!
Hi,
I think this might be what you want, but it is fixed numbers per person. If you want to apply different numbers per person dependant on date then that will be more complicated, and you will need to give me an example of the source spreadsheet.
What I have done here is to alter the test in column D to return blank if the date doesnt match, but if it does match, to then lookup the phone number from another sheet. I have also included an alternative (mobile/cell) as column E working on a similar lookup.
I have included both worksheets, but obviously the formula in column D is dependant on the NameTable worksheet being in the right place, or the formula being altered to suit.
The macro to refresh the filters just checks for non blanks now rather than a "Y".
I may be available later on, but expect to be travelling all tomorrow so I may not be able to respond immediately.
Regards
AS
Business Accounts
Answer for Membership
by: jack_Posted on 2009-08-31 at 21:32:14ID: 25228532
Please attach some samples ...Ur input and output....