Using index and match from another source excel file. Search source list for rows that match lookup value and return rows for days in worksheet of specified month plus the last day of previous month that included in the list. This works for the specified month. I do not know how to include the last day of previous month that included in the list. Please help. Also, I have to enter the specified month as a number. I have tried to modify formula so that I can use the word for the month instead, but cannot get that to work. Please help.
=LET( data, '[AccountValues-Year2024SSG.xlsx]Year-24 SSG'!A:L, D3Match, FILTER(data, '[AccountValues-Year2024SSG.xlsx]Year-24 SSG'!B:B=D3), monthMatch, FILTER(D3Match, MONTH(INDEX(D3Match,0,1))=E3), yearMatch, FILTER(monthMatch, YEAR(INDEX(monthMatch,0,1))=F3), IF(ROWS(yearMatch)>0, yearMatch, "No matches found") )
This does not work when I tried to use month names.
=IFERROR( FILTER( '[AccountValues-Year2024SSG.xlsx]Year-24 SSG'!A:L, ('[AccountValues-Year2024SSG.xlsx]Year-24 SSG'!B:B=D3) * (MONTH('[AccountValues-Year2024SSG.xlsx]Year-24 SSG'!A:A)=MONTH(DATE(F3,MATCH(E3,{"January","February","March","April","May","June","July","August","September","October","November","December"},0),1))) ), "No matches found" )
So 2 questions: 1. the previous month question, and 2. the month word question. I don't have the knowledge to use VBA solutions.
Thank you, Jim
=LET( data, '[AccountValues-Year2024SSG.xlsx]Year-24 SSG'!A:L, D3Match, FILTER(data, '[AccountValues-Year2024SSG.xlsx]Year-24 SSG'!B:B=D3), monthMatch, FILTER(D3Match, MONTH(INDEX(D3Match,0,1))=E3), yearMatch, FILTER(monthMatch, YEAR(INDEX(monthMatch,0,1))=F3), IF(ROWS(yearMatch)>0, yearMatch, "No matches found") )
This does not work when I tried to use month names.
=IFERROR( FILTER( '[AccountValues-Year2024SSG.xlsx]Year-24 SSG'!A:L, ('[AccountValues-Year2024SSG.xlsx]Year-24 SSG'!B:B=D3) * (MONTH('[AccountValues-Year2024SSG.xlsx]Year-24 SSG'!A:A)=MONTH(DATE(F3,MATCH(E3,{"January","February","March","April","May","June","July","August","September","October","November","December"},0),1))) ), "No matches found" )
So 2 questions: 1. the previous month question, and 2. the month word question. I don't have the knowledge to use VBA solutions.
Thank you, Jim