Como usar a fórmula NETWORKDAYS no Planilhas Google

In Google Sheets application, if we need to know the number of net working days between two specified dates, the NETWORKDAYS formula can be our companion.

Sintaxe

NETWORKDAYS(start_date, end_date, [holidays])

  • data_inicial – the starting date in the period from which the formula calculates the number of net working days. This date, if not a holiday, is considered for counting as a working day.
  • data_final – the ending date in the period until which the formula calculates the number of net working days. Like data_inicial, this date too, if not a holiday, is considered for counting as a working day.
  • holidays – is an optional parameter that expects either an array or an address reference to the range of cells that consists of holiday dates.

 

39

Automatize as transferências de dados além da Importrange

Saiba como

Usage: NETWORKDAYS Formula

Let us try our hands on this formula. Please consider the snapshot below. We have a sample list of holiday dates from A2 to A6.

NETWORKDAYS Formula: Usage

In the first example case, the data_inicial e data_final parameters take outputs from two different DATE() functions, evaluated to 15-Mar-2017 and 15-Apr-2017 respectively. And, we ignored the holiday’s parameter altogether. Therefore, the NETWORKDAYS formula calculates the resulting number of work days falling between the data_inicial e data_final. It does so by ignoring the Saturdays and Sundays but does include the start and end dates

The second example is pretty similar. Except, the data_inicial e o data_finalparameters are references to the cells that has dates. Also, we have given a range reference to the list of holidays for the third parameter. So it counts the net working days after ignoring Saturdays, Sundays, and the list of holidays that fall between the data_inicial e data_final.

Unlike the previous two cases, the input values for data_inicial e data_finalparameters are absolute numbers for the next two examples. Nevertheless, the formula’s working remains the same.

Casos de interesse

Vamos experimentar um pouco mais e inserir valores de data baseados em texto para o data_inicialdata_inicial parâmetro.

NETWORKDAYS Formula in Google Sheets

In the first example, the formula truncates the decimal values and uses only the integer values and accordingly evaluates the count. Of course, it cannot accept negative numbers, as there is no date interpretation for such values.

From the next two examples, we will see that the NETWORKDAYS formula accepts input date strings in the “dd-mmm-yyyy” and “mm-dd-yyyy” formats. But it will throw up an error with “dd-mm-yyyy” date format strings.

NETWORKDAYS formula

And there you go! Use the NETWORKDAYS formula in Google Sheets to calculate the number of net working days between two specified dates.

Se quiser saber mais sobre as várias fórmulas do Planilhas Google, dê uma olhada em nossa postagem no blog sobre o Fórmula do DAYS360 no Planilhas Google.

Como alternativa, confira as postagens relacionadas no blog abaixo!

39

Uma ferramenta para mesclar, dividir e filtrar todos os dados da sua planilha

Saiba como

Você também pode gostar...

Recursos e fórmulas do Google Sheets

Como encontrar a taxa de juros nominal usando o Planilhas Google

Sarah é uma jovem profissional que está tomando decisões financeiras importantes. De cartões de crédito a hipotecas, empréstimos estudantis e investimentos...
Recursos e fórmulas do Google Sheets

Extrair dados do Google Agenda para o Planilhas Google usando o Apps Script

Esta postagem foi publicada originalmente em nosso fórum da comunidade. Objetivo: Este guia demonstra como usar o Google Apps Script para extrair dados...
Recursos e fórmulas do Google Sheets

Usando a função PROPER para colocar a primeira letra de cada palavra em maiúscula no Planilhas Google

Observação: esta postagem foi publicada originalmente em nosso fórum da comunidade. Alguma vez você já precisou limpar uma lista de nomes, títulos ou qualquer...