OUTRO EXEMPLO DE CÁLCULO DE HORAS NEGATIVAS (Another Example for Calculating Negative Hours)

Outra questão que me foi colocada recentemente relacionava-se com o cálculo de atrasos numa escala de produção. Neste caso específico, o atraso implicava que o resultado fosse negativo. E o Excel não reconhece directamente valores negativos quando se trata cálculo com unidades de tempo.
Another question I was asked recently was related to the calculation of delays on a production scale. In this particular case, the delay meant that the result was negative. And Excel does not directly recognize negative values ​​when it comes to calculation units of time.

A solução apresentada foi a seguinte:
My solution was as follows:


Fórmula da Célula E6 e seguintes:
= SE(D6>C6;RESTO(D6-C6;1);RESTO(C6-D6;1))
Formula in E6 and below:
= IF(D6>C6,MOD(D6-C6,1);MOD(C6-D6,1))
As células a vermelho realçam os casos em que o resultado é negativo e, por isso, existe um atraso  na escala.
Para que essas células apareçam com fundo vermelho, recorre-se à formatação condicional:
The red cells to enhance the cases in which the result is negative and, therefore, there is a delay in scale.

For these cells appear with red background, makes use of the conditional formatting:
Formatação Condicional / Conditional Format

Comentários

Mensagens populares deste blogue

EXCEL 2007 - FUNÇÕES PARA CALCULAR HORAS (Functions to Calculate Hours)

CONVERTER HORAS EM DIAS DE TRABALHO (Convert Hours to Workdays)

CALCULAR HORAS ENTRE DUAS DATAS COM UMA CONDIÇÃO (Calculate Hours Between Two Dates with a Condition)