Extracting first value of each month

  • Thread starter Thread starter Number_Cruncher
  • Start date Start date
N

Number_Cruncher

Hello,

How do you extract the first value (plus the date) of each month out of
a series?

Example
2/4/05 data
2/12/05 data
2/13/05 data
3/1/05 data
3/2/05 data
etc


In this sample I only want to pull:
2/4/05 data
3/1/05 data

In reality I have a large dataset I am working with (15 years with
weekly entries). I just want to pull the first value (and date) of each
month.


Thanks in advance for any help.

Al
 
=INDEX(B1:B1000,MATCH(MAX(IF((YEAR(A1:A1000)=2005)*(MONTH(A1:A1000)=2),A1:A1
000)),A1:A1000,0))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Different interpretation...

Assuming that A2:B10 contains the data, try the following formula which
needs to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER...

C2, copied down and over to Column D:

=INDEX(A$2:A$10,SMALL(IF(MATCH($A$2:$A$10-DAY($A$2:$A$10)+1,$A$2:$A$10-DA
Y($A$2:$A$10)+1,0)=ROW($A$2:$A$10)-ROW($A$2)+1,ROW($A$2:$A$10)-ROW($A$2)+
1),ROWS(C$2:C2)))

Hope this helps!
 
Different interpretation...

Assuming that A2:B10 contains the data, try the following formula which
needs to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER...

C2, copied down and over to Column D:

=INDEX(A$2:A$10,SMALL(IF(MATCH($A$2:$A$10-DAY($A$2:$A$10)+1,$A$2:$A$10-DA
Y($A$2:$A$10)+1,0)=ROW($A$2:$A$10)-ROW($A$2)+1,ROW($A$2:$A$10)-ROW($A$2)+
1),ROWS(C$2:C2)))

Hope this helps!

Thank You!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top