Hi, looking at historical stock data downloaded from Yahoo. It is basically 6 columns: Date, Open, High, Low, Close, AdjClose, Volume.
I am trying to Filter by the first date of the year and the last date of the year to get the Close. The issue I am having is that all the data is on working days, so it's not typically the 1st of the month. Actuallly, January 1st is always a holiday so it's the 2nd, 3rd or 4th of the month. Same with the last day day of the year, not all are the 31st and may even the last working day is the 28th of the month. I have used a formula to reduce it down by Filtering (using 365) for the DAY equal to or less than 3 and that helps, but want to clean it up to just the first working day of the year. Attached is an image of an example worksheet, but that formula is:
=FILTER(E:E,(MONTH(A:A)=1)*(DAY(A:A)<=3))
=FILTER(E:E,(MONTH(A:A)=1)*(DAY(A:A)=1),(DAY(A:A)=2))
=FILTER(E:E,(MONTH(A:A)=1)*(DAY(A:A)=2),(DAY(A:A)=3))
I have altered it to filter to the 2nd as well as the 3rd, as well as I have attempted multiple combined nested IF's, AND's and OR's without success to generate a single formula. Looking for any suggestions to what is likely a straight forward solution that I can no longer see. I've put those other formulas on the attached image.
I have tried multiple times but can not get 365 to allow me to let Xl2bb macros work even though MSFT trust center allows. It's loaded on my sheet so sorry, best I can do is an image of the start of the sheet. Understand, I am looking at 9347 rows of data, not just the few in the image.
Thanks!
I am trying to Filter by the first date of the year and the last date of the year to get the Close. The issue I am having is that all the data is on working days, so it's not typically the 1st of the month. Actuallly, January 1st is always a holiday so it's the 2nd, 3rd or 4th of the month. Same with the last day day of the year, not all are the 31st and may even the last working day is the 28th of the month. I have used a formula to reduce it down by Filtering (using 365) for the DAY equal to or less than 3 and that helps, but want to clean it up to just the first working day of the year. Attached is an image of an example worksheet, but that formula is:
=FILTER(E:E,(MONTH(A:A)=1)*(DAY(A:A)<=3))
=FILTER(E:E,(MONTH(A:A)=1)*(DAY(A:A)=1),(DAY(A:A)=2))
=FILTER(E:E,(MONTH(A:A)=1)*(DAY(A:A)=2),(DAY(A:A)=3))
I have altered it to filter to the 2nd as well as the 3rd, as well as I have attempted multiple combined nested IF's, AND's and OR's without success to generate a single formula. Looking for any suggestions to what is likely a straight forward solution that I can no longer see. I've put those other formulas on the attached image.
I have tried multiple times but can not get 365 to allow me to let Xl2bb macros work even though MSFT trust center allows. It's loaded on my sheet so sorry, best I can do is an image of the start of the sheet. Understand, I am looking at 9347 rows of data, not just the few in the image.
Thanks!