ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I select from within a range of dates? (https://www.excelbanter.com/excel-discussion-misc-queries/71013-how-do-i-select-within-range-dates.html)

Joe Leon

How do I select from within a range of dates?
 
I have a column with dates and what I would like to do is in two different
cells is place two different dates and then have the dates be placed in a
different column in ascending order.

dates in column from date to date results
02/04/2005 12/01/2005 03/31/2006 01/05/2006
01/05/2006
02/13/2006
12/12/2005
04/12/2006
02/13/2006


Roger Govier

How do I select from within a range of dates?
 
Hi Joe
Assuming your dates start in A2, your From date is in B1, your To date
is in C1.
You will need a helper column, D, which can be hidden if required.
In cell D2
=IF(AND(A2=$B$1,A2<=$C$1),A2,"") and copy down column D as far as
required.
In cell E2
=IF(ISERROR(SMALL($D:$D,ROW(1:1))),"",SMALL($D:$D, ROW(1:1)))
again, copy down as far as required.
Incidentally, from your sample, I make the earliest qualifying date to
be 12/12/2005 not 01/05/2006

--
Regards

Roger Govier


"Joe Leon" wrote in message
...
I have a column with dates and what I would like to do is in two
different
cells is place two different dates and then have the dates be placed
in a
different column in ascending order.

dates in column from date to date
results
02/04/2005 12/01/2005 03/31/2006 01/05/2006
01/05/2006
02/13/2006
12/12/2005
04/12/2006
02/13/2006




Joe Leon

How do I select from within a range of dates?
 
Roger,

Thanks! Works like a charm and very well explained....

Joe...

"Roger Govier" wrote:

Hi Joe
Assuming your dates start in A2, your From date is in B1, your To date
is in C1.
You will need a helper column, D, which can be hidden if required.
In cell D2
=IF(AND(A2=$B$1,A2<=$C$1),A2,"") and copy down column D as far as
required.
In cell E2
=IF(ISERROR(SMALL($D:$D,ROW(1:1))),"",SMALL($D:$D, ROW(1:1)))
again, copy down as far as required.
Incidentally, from your sample, I make the earliest qualifying date to
be 12/12/2005 not 01/05/2006

--
Regards

Roger Govier


"Joe Leon" wrote in message
...
I have a column with dates and what I would like to do is in two
different
cells is place two different dates and then have the dates be placed
in a
different column in ascending order.

dates in column from date to date
results
02/04/2005 12/01/2005 03/31/2006 01/05/2006
01/05/2006
02/13/2006
12/12/2005
04/12/2006
02/13/2006






All times are GMT +1. The time now is 08:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com