Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Caro-Kann Defence
 
Posts: n/a
Default 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!
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

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!



  #3   Report Post  
Caro-Kann Defence
 
Posts: n/a
Default

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!




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"