# Apurar valores

1. ## Apurar valores

olá pessoal,

Necessito de encontrar na tabela em anexo o maximo de viaturas que se encontram em simultâneo no exterior.

alguma função que devolva esse valor?

2. ## Re: Apurar valores

Welcome to the forum!

This is an interesting problem. I don't know any short cut formula. I did it the long way.

Hopefully some experts will pick it and help solve the problem in a more elegant way.

Bem-vindo ao fórum!

Este é um problema interessante. Não conheço nenhuma fórmula de atalho. Eu fiz isso pelo caminho mais longo.

Esperançosamente, alguns especialistas irão escolher e ajudar a resolver o problema de uma forma mais elegante.

3. ## Re: Apurar valores

Sua solução me ajudou muito, porém ainda é muito complicado de aplicar no meu caso real, pois tenho muitos valores (1 ano com +10.000 linhas).
Talvez alguém ajude como você fez

Atenciosamente.

4. ## Re: Apurar valores

Perhaps the following will help.
1. The names of the vehicles are listed in F1:J1
2. Cells E2:E16 are populated using: =COUNTIFS(F2:J2,">0")
3. Cells F2:J16 are populated using: =COUNTIFS(\$A\$2:\$A\$16,\$A2,\$C\$2:\$C\$16,"<"&\$D2,\$D\$2:\$D\$16,">"&\$C2,\$B\$2:\$B\$16,F\$1)
4. Cell M1 displays the maximum vehicles out at one time using: =MAX(E2:E16)
Note that this method calculates five vehicles to be out at one time, which by observation appears to be correct i.e. when vehicle A goes out at 10:30, vehicles B and C are still out and before vehicle A returns at 11:00 vehicles D and E go out.
Let us know if you have any questions.

5. ## Re: Apurar valores

Thanks JeteMc for answering the call of the calvary.

Cell B6 I believe is wrongly stated as Viaura D. If changed to Viatura D, max is 4.

6. ## Re: Apurar valores

@josephteh, Good catch - Thank You.
I also changed I1 in my file from Viaura D to Viatura D which puts the max at 5.

7. ## Re: Apurar valores

Oh ya.. by the way.. great formula! Here is a Rep!

8. ## Re: Apurar valores

@josephteh, Thank You for the feedback and for the added reputation. I hope that you have a blessed day.

9. ## Re: Apurar valores

You are welcome, JeteMc. You too have a blessed day.

10. ## Re: Apurar valores

muito bom!
acho que consegui resolver o meu problema.

11. ## Re: Apurar valores

Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

12. ## Re: Apurar valores

You have given me NEGATIVE reputation - was there a problem? You added the words "thank you" to the reputation comment box, so was this a mistake?

13. ## Re: Apurar valores

You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1