Extracting Date Range

Brewski

New Member
Joined
Apr 3, 2002
Messages
2
I have a database with hourly temperature values that I'm trying to extract a range of data "between" to dates. The data file looks like:
Date Time Temp
01-Jan-02 0:00 29.9
01-Jan-02 1:00 30.3
01-Jan-02 2:00 29.9
01-Jan-02 3:00 29.9

I'm trying to use the Advanced Filter with the following Criteria range:

Date Time Temp
>=37319 (= 3/4/02)
<=37325 (= 3/10/02)

I works if I reverse this and "exclude" data between the two dates or only search in one direction.

What am I doing wrong? I'd like to eventually create a VBA so the user simply enters two date to extract all the data "between" the two timepoints.

Thanks in advance.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Date Time Temp Date Date Time Temp
01-Jan-02 5:00 29-Jan-00 >=37316<=37325
05-Mar-02 6:00 30-Jan-00
06-Mar-02 7:00 29-Jan-00 Date Time Temp
15-Mar-02 8:00 29-Jan-00 05-Mar-02 6:00 30-Jan-00
06-Mar-02 7:00 29-Jan-00


The Data Filter works OK.
In the criteria use the Heading Date 2 times
1. start =">="&37316
2. end ="<="&37325

I am not sure what date system you are using;
I revised the sample and the criteria dates.
This message was edited by Dave Patton on 2002-04-04 11:27
 
Upvote 0
It works!! Thanks, I owe you a beer.

I was thinking about duplicating the Date column, but just didn't try it.

Cheers,
Brewski
 
Upvote 0
You could have used a vertically-oriented, 2-cell computed criteria with the 1st cell left intentially blank and the 2nd cell containing the formula...

=AND(Date>="3/4/02"+0,Date<="3/10/02"+0)
 
Upvote 0

Forum statistics

Threads
1,214,535
Messages
6,120,093
Members
448,944
Latest member
SarahSomethingExcel100

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top