Redeem the largest number of a matrix with criteria

Asked

Viewed 21,680 times

5

I need some formula or logic to rescue the largest number of a matrix, but with certain criteria.

As well as the formulas CONT.SES and SOMASES that counts and sums the numbers of a matrix when the criteria are 'met'.

Something that would work as a MAIOR.SES(IntervaloApuração;K;IntervaloCriterio1;Criterio1;...)

A simple example of how it would work:

+---+-------+-------+------------+
|   |   A   |   B   |     C      |
+---+-------+-------+------------+
| 1 | Data  | Ativo | Quantidade |
| 2 | 26/07 | SIM   | 35         |
| 3 | 26/07 | SIM   | 39         |
| 4 | 26/07 | NAO   | 40         |
| 5 | 27/07 | SIM   | 13         |
+---+-------+-------+------------+

If I want the largest amount of the following criteria: data = 26/07 and Ativo = SIM the result would return me the amount of record 3 ie: 39

Someone with a solution?

  • 2

    Could create an example of a matrix and what it expects as a result?

  • Math, I edited the post with the example.

2 answers

10


Use the "MAXIMUM" function and within it use the "SE". However, you should be aware that the formula thus works for a single cell, for your case it is necessary to make it work with vectors, and for that there is a tool in Excel that is called Array Formulas.

To use it, it’s as simple as pressing three keys. Instead of pressing Enter, you will press Ctrl + Shift + Enter.

To be sure whether it worked or not, check whether the formula got a pair of keys before and after it, like this: {=MÁXIMO(SE(A2:A6=F2;(SE(B2:B6=F3;C2:C6))))}.

In your case, it would look like this:

inserir a descrição da imagem aqui

Upshot:

inserir a descrição da imagem aqui

But don’t forget the Ctrl + Shift + Enter by typing the formula into cell F6.

  • Show ball! It was also possible to use the LARGEST that you can even rescue the second largest, bigger weaver and etc..

0

Even simpler, just use the formula MAXIMIMOSES, which does exactly what you want:

MÁXIMOSES(IntervaloApuração;IntervaloCriterio1;Criterio1;...)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.