My current formula is:
=INDEX(QUERY({$A$2:$P},"select max(Col"&COLUMN($M$2)&") where lower(Col"&COLUMN($D$2)&") contains lower('"& D3 &"')",1),2,1)
Here's the following logic I used:
- My customers have different equipments, which I have to do QA every year. On that Sheet, I have listed all the equipments from my customers.
- Col D has the name of my customers. Each customer has multiple records, one for each equipment they have.
- Col M has the date I last did QA on their equipment.
- I used the QUERY function to retrieve the last date I QA'd an equipment from that customer (using the max(Col M)).
- Used the INDEX function to retrieve just the value of that 'max date'.
What I would like:
I managed to do it just for cell D3, but I would like to expand it with an ARRAYFORMULA to D3:D. I tried applying with these 3 options below, but it keeps returning only one value:
1. =INDEX(QUERY({$A$2:$P},"select max(Col"&COLUMN($M$2)&") where lower(Col"&COLUMN($D$2)&") contains lower('"& ARRAYFORMULA(D3:D) &"')",1),2,1)
2. =ARRAYFORMULA(INDEX(QUERY({$A$2:$P},"select max(Col"&COLUMN($M$2)&") where lower(Col"&COLUMN($D$2)&") contains lower('"& D3:D &"')",1),2,1))
3. =ARRAYFORMULA(INDEX(QUERY({$A$2:$P},"select max(Col"&COLUMN($M$2)&") where lower(Col"&COLUMN($D$2)&") contains lower('"& ARRAYFORMULA(D3:D) &"')",1),2,1))
How could I make it work?

Indexwhen use witharrayformulawill always return one row value, it is the restriction . You need to copy the formula to all the row you want in case you want to useindexfunction, else try other formula