ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select rows in a date range (https://www.excelbanter.com/excel-programming/407099-select-rows-date-range.html)

ryguy7272

Select rows in a date range
 
This code from Bob Phillips works brilliantly for two input dates that match
the dates in the range!!
http://www.microsoft.com/office/comm...sloc=en-us&p=1

I am wondering how to make a change to allow Excel to find the next higher
date in the range if there is not an exact match between the two input dates
and the dates in the range.

Thanks so much,
Ryan--


--
RyGuy

ryguy7272

Select rows in a date range
 
Ah! I got it! Just changed those zeros to ones. From Excel's help:
If match_type is 1, MATCH finds the largest value that is less than or equal
to lookup_value.

Thanks to anyone who looked at this and thanks to you Bob for coming up with
the code and posting it on this DG!!


Ryan--

--
RyGuy


"ryguy7272" wrote:

This code from Bob Phillips works brilliantly for two input dates that match
the dates in the range!!
http://www.microsoft.com/office/comm...sloc=en-us&p=1

I am wondering how to make a change to allow Excel to find the next higher
date in the range if there is not an exact match between the two input dates
and the dates in the range.

Thanks so much,
Ryan--


--
RyGuy



All times are GMT +1. The time now is 05:33 AM.

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