ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Finding min and max date of a given month (https://www.excelbanter.com/excel-worksheet-functions/26096-finding-min-max-date-given-month.html)

Caro-Kann Defence

Finding min and max date of a given month
 
Hi.

I seem to have one side of the following problem (ie. finding the last date).

I have a list of historical stock quotes and want to find the opening and
closing dates for each month. I can find the last date recorded for a month
(where I use YYYY-MM as the format) using the formula

=MAX((TEXT(Sheet1!$A$2:$A$50000,"yyyy-mm")=$B3)*(Sheet1!$A$2:$A$50000))

However, when I try to change the MAX to MIN it doesn't seem to work.

Any help would be appreciated.

Thanks!

Bernie Deitrick

Caro-Kann Defence,

=MIN(IF(TEXT(Sheet1!$A$2:$A$50000,"yyyy-mm")=$B3,Sheet1!$A$2:$A$50000))

HTH,
Bernie
MS Excel MVP


"Caro-Kann Defence" wrote in
message ...
Hi.

I seem to have one side of the following problem (ie. finding the last

date).

I have a list of historical stock quotes and want to find the opening and
closing dates for each month. I can find the last date recorded for a

month
(where I use YYYY-MM as the format) using the formula

=MAX((TEXT(Sheet1!$A$2:$A$50000,"yyyy-mm")=$B3)*(Sheet1!$A$2:$A$50000))

However, when I try to change the MAX to MIN it doesn't seem to work.

Any help would be appreciated.

Thanks!




Caro-Kann Defence

You're the best!

"Bernie Deitrick" wrote:

Caro-Kann Defence,

=MIN(IF(TEXT(Sheet1!$A$2:$A$50000,"yyyy-mm")=$B3,Sheet1!$A$2:$A$50000))

HTH,
Bernie
MS Excel MVP


"Caro-Kann Defence" wrote in
message ...
Hi.

I seem to have one side of the following problem (ie. finding the last

date).

I have a list of historical stock quotes and want to find the opening and
closing dates for each month. I can find the last date recorded for a

month
(where I use YYYY-MM as the format) using the formula

=MAX((TEXT(Sheet1!$A$2:$A$50000,"yyyy-mm")=$B3)*(Sheet1!$A$2:$A$50000))

However, when I try to change the MAX to MIN it doesn't seem to work.

Any help would be appreciated.

Thanks!






All times are GMT +1. The time now is 02:36 PM.

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