Please help wonderful people!
I'm trying to use a MAXIFS formula within an ARRAYFORMULA in Google Sheets to obtain the latest date in column A from sheet 1, where the value in column A of sheet 2 matches in column E in sheet 1. Here's my formula:
=ARRAYFORMULA(IF(ISBLANK(A2:A),"",IF(MAXIFS(Sheet1!$A:$A,Sheet1!$E:$E,A2:A)=0,"",MAXIFS(Sheet1!$A:$A,Sheet1!$E:$E,A2:A))))
Sheet 2:
Sheet 1:
I then repeat these in the 6 further columns to give the previous 6 dates using an extra criteria in the MAXIFS formula where I ask for the latest date, less than the previous column. Formula as follows:
=ARRAYFORMULA(IF(ISBLANK(A2:A),"",IF(MAXIFS(Sheet1!A:A,Sheet1!E:E,A2:A,Sheet1!A:A,"<"&B2:B)=0,"",MAXIFS(Sheet1!A:A,Sheet1!E:E,A2:A,Sheet1!A:A,"<"&B2:B))))
It all works on the first row but every row after that gives the same results suggesting the formula must be using the value in A2 as the criterion in the MAXIFS statement on all subsequent rows.
I can't see what I've got wrong so it makes me think MAXIFS in ARRAYFORMULA may not work...
Please help