Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I extract line of info based on a date range

Status
Not open for further replies.

2ks

Technical User
Jan 13, 2007
54
GB
Hi all

I am trying to extract lines of data based on a date column within excel. Basically the date column lists interview dates.

Each day a user has to extract the following days data and insert into a blank spreadsheet.

I would like this to be done via a macro that opens and requests the input of the date required to search and then it links to the excel list (which could be thousands of lines) matches, extracts all lines with this matching date and inserts them into a new sheet.

Any help and I owe you a beer one day!!

Thanks

Nikk
 
And what have you tried so far ?
Hint: have a look at AdvancedFilter

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 




Hi,

Check out MS Query, Using MS Query to get data from Excel faq68-5829

Little or no VBA required.

Skip,

[glasses] [red][/red]
[tongue]
 
Autofilter / Advanced filter will do what you need. Try recording yourself performing the actions manually and popst back with the code generated - we can then help you midify it for future use

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
I have worked out how to extract by date + 1 and insert into new sheet. This runs from macro and saves with the date + 1 automatically.

But what can I add in front to add a input date and then link to colum to extract by selection

ta all
 



2ks,

You DO realize that we cannot read your mind or see what you see on your sheet. YOU have to tell us, please, in painful detail, CLEARLY, CONCISELY and COMPLETELY.

You have really not told us ANYTHING of value that we could use to help you achieve your goal.

Skip,

[glasses] [red][/red]
[tongue]
 
To add an input date you have 3 options

1: collect date from worksheet cell

2: collect date using an input box

3: collect date using textbox control from a userform

1 will not look as interactive but will be able to be easily validated

2 is the easy way to go but will be harder to validate in code

3 will involve the most effort but will look most professional....

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top