Arno B
Arno B

Reputation: 11

Google Sheets - Using MAXIFS within ArrayFormula

I'm reaching out because I'm facing an issue in Google Sheets for which I can't find a solution and I'm certain someone here might have an answer to save me.

The situation is actually quite simple :

See a screenshot of the file here

Of course, this can really simply be done with the MAXIFS() formula such as follows :

=maxifs(H:H;D:D;DX) where X is the n° of the lign.

Now, the issue appears when I try to transform this formula to an "ArrayFormula".

When trying to transform it, I tried typing :

=arrayformula(maxifs(H:H;D:D;D:D))

But it doesn't "expand" to the following lines. The formula works for the line in which it is typed, but I can't get it to "replicate".

Does anyone here have an idea of how to solve this issue?

I wish you all a very pleasant week!

Upvotes: 1

Views: 1890

Answers (2)

Harun24hr
Harun24hr

Reputation: 37135

Use MAXIFS() with BYROW() to make it dynamic. Try-

=BYROW(A3:A9,LAMBDA(x,MAXIFS(B3:B,A3:A,x)))

To refer full column as input parameter, use-

=BYROW(A3:INDEX(A3:A,COUNTA(A3:A)),LAMBDA(x,MAXIFS(B3:B,A3:A,x)))

enter image description here

Upvotes: 1

rockinfreakshow
rockinfreakshow

Reputation: 30289

You may try:

=map(D3:D,lambda(z,if(z="",,vlookup(z,sort({D3:D,H3:H},2,0),2,))))

enter image description here

Upvotes: 1

Related Questions