Help with formulas

Andrew skamel

New member
Does anyone know how to calculate how many days in a set amount time and have it counts the first of the month in each month and set it as a value. The dates that it checks in between are in two separate cells.
 
Hello Andrew Skamel,

You can calculate the number of days between two dates (stored in separate cells) very easily in Excel.

Assume:
  • Start Date is in A1
  • End Date is in B1
To count the number of days between them (including the start date), use:
=B1 - A1 + 1

If you do not want to include the start date, then simply use:
=B1 - A1

If your goal is to count how many days fall within each month between two dates and have the count reset at the first of every month, that’s a bit more advanced and may require a helper column or a breakdown by month.

For example, to count the number of days from a start date to the end of that same month:
=EOMONTH(A1,0) - A1 + 1

And to count from the first of a month to an end date:
=B1 - EOMONTH(B1,-1)
 
Hola Andrew Skamel ,

Puede calcular el número de días entre dos fechas (almacenadas en celdas separadas) muy fácilmente en Excel.

Asumir:
  • La fecha de inicio está en A1
  • La fecha de finalización está en B1
Para contar el número de días entre ellos (incluida la fecha de inicio), utilice:
=B1 - A1 + 1

Si no desea incluir la fecha de inicio, simplemente utilice:
=B1 - A1

Si su objetivo es contar cuántos días hay entre dos fechas en cada mes y restablecer el recuento el primero de cada mes, esto es un poco más avanzado y puede requerir una columna auxiliar o un desglose por mes.

Por ejemplo, para contar el número de días desde una fecha de inicio hasta el final de ese mismo mes:
=FINMES(A1,0) - A1 + 1

Y contar desde el primero de un mes hasta una fecha final:
=B1 - FINMES(B1,-1)
Con la función sifecha(FI;FF;"D")+1

1772654494111.png
 
Hello JORGE W. ROSERO,

Thanks for sharing the alternative formula. Yes, using:

=DATEDIF(StartDate,EndDate,"D")+1

This formula is another good way to calculate the total number of days between two dates, including the start date.

Just keep in mind that DATEDIF is mainly useful for getting the total difference, but if the goal is to break the days down by month (starting from the 1st of each month), additional formulas such as EOMONTH may still be needed to calculate the days that fall within each specific month.

Appreciate your contribution to the discussion!
 

Online statistics

Members online
0
Guests online
278
Total visitors
278

Forum statistics

Threads
449
Messages
1,982
Members
1,402
Latest member
ga6789stream
Back
Top