Sobre este exercício
Um conjunto de dados de 60 linhas em uma planilha, uma célula de resposta, cerca de 6 minutos. Corrigido no seu navegador: o valor e a fórmula por trás dele, com feedback que mostra o que corrigir.
Como resolver
- F2
=EOMONTH(C2,E2)
EOMONTH(start, months) returns the last day of the month that lies the given number of months after the start date — EOMONTH(C2,1) for a March invoice is 30 April, whatever day in March the invoice carries. Because the terms differ by customer, the months argument reads column E instead of a typed number, and the formula fills down unchanged. Date functions return serial numbers; the cell only looks like a date once it carries a date number format, which is why the second step exists.
Pitfall 1: EOMONTH, EDATE, DATE and WORKDAY all return bare serials in a General cell (46142 instead of 2026-04-30) — Excel auto-formats a plain =C2+30, but not function results; always format the answer column. Pitfall 2: EDATE(C2,1) is "same day next month", not the month end, and it clips 31 January to 28 February; for month-end terms use EOMONTH, for "net 30" use C2+30, for "30 days end of month" use EOMONTH(C2,0)+30. Pitfall 3: a start date stored as text ("2026-03-14" typed with an apostrophe or imported from CSV) makes EOMONTH return #VALUE!; convert with DATEVALUE first. Negative months look backwards (EOMONTH(C2,-1) is the end of the previous month) and EOMONTH(C2,0) is the end of the current month — handy for period-end accruals. The classic pre-EOMONTH idiom DATE(YEAR(C2),MONTH(C2)+E2+1,0) still works everywhere: day 0 of the following month is the last day of the target month. Version note: all of these functions exist in every Excel version; EOMONTH was once an Analysis ToolPak add-in function and is built in since Excel 2007.
Outras formas que funcionam
- =EOMONTH(EDATE(C2,E2),0) — move N months with EDATE, then jump to the month end
- =DATE(YEAR(C2),MONTH(C2)+E2+1,0) — day 0 of the following month, no EOMONTH needed
- =EOMONTH(C2,E2)+0 — identical value; some people add +0 to force a number before formatting
Erros comuns
Using EDATE alone: =EDATE(C2,E2) returns 2026-04-07 for INV-2026-0401 — the same day 3 month(s) later — instead of the month end 2026-04-30 the terms demand.
Como corrigimos
Qualquer fórmula que produza o resultado certo é aceita, a menos que a tarefa cite uma função: nesse caso, outra função vale metade da pontuação. Comparamos os valores com uma pequena tolerância e ignoramos maiúsculas e espaços no texto. Um número certo digitado à mão em vez de uma fórmula vale metade da pontuação. Tarefas com várias células valem a pontuação integral com 100% das células certas e metade a partir de 50%. Quando faz diferença, também mudamos uma célula de entrada em uma cópia da sua planilha e verificamos se sua fórmula acompanha.
Respostas calculadas com as regras do Excel 365 e verificadas no nosso corretor em 16 de novembro de 2026. Autor: GridBelt team.