[Dropped] Count of elapsed days between monthly dates

Discuss the spreadsheet application
Locked
wireflight
Posts: 11
Joined: Sat Jan 15, 2011 12:43 pm

[Dropped] Count of elapsed days between monthly dates

Post by wireflight »

Column A values = year
Column B values = month
Column C values = day of month

The beginning date is 2022-06-10. I’m working in Column G with the following:
= COUNTIF(C$3:C3,10)-1
returns the elapsed months; I can add
&“ m + ”&
between that and the day-count formula, followed by
&“ d”
but I don’t know how to get the calculations to be correct from month to month, as the number of days between the 10th day of consecutive months changes throughout the year.

Output in cell G33 should be: 1 m + 0 d
Output in cell G35 should be: 1 m + 2 d
etc

What formula should I enter, to get the result I need?

Thanks to all the people smarter than I, especially to those who reply with a helpful answer. :)
Last edited by MrProgrammer on Thu Jul 10, 2025 11:36 pm, edited 2 times in total.
Reason: Dropped: No response from wireflight perhaps because Calc date formulas Section D has a solution
OpenOffice.org 3.2.1
OOO341m1 (Build:9593) - Rev. 1372282
Windows Vista Home Premium with Service Pack 1 installed (64-bit version) {computer is Ibuypower, Intel Core i7-3630QM CPU @ 2.4 GHz; 16GB installed RAM}
User avatar
MrProgrammer
Moderator
Posts: 5322
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Repeating count of elapsed days between monthly dates?

Post by MrProgrammer »

[Solved] Calculate a period as years, months, and days    (you have a post there, wireflight)

wireflight wrote: Thu Jun 26, 2025 9:53 pm What formula should I enter, to get the result I need?
Attach a spreadsheet demonstrating the situation (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the spreadsheet itself). I will not help further unless you attach a spreadsheet document.

 Edit: Perhaps you can use the As nnM nnD formula in section D of this tutorial. 
[Tutorial] Calc date formulas Section D: Determine years/months/weeks/days between dates
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.6, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
wireflight
Posts: 11
Joined: Sat Jan 15, 2011 12:43 pm

Re: Repeating count of elapsed days between monthly dates?

Post by wireflight »

This is awkward: I’m using my phone here, as my computer is not connected to the internet. It may take me quite a while to be able to satisfy those conditions: feel free to help others while I work on getting my stuff together. I’ll post back when I have something workable. Have a great day. :)
OpenOffice.org 3.2.1
OOO341m1 (Build:9593) - Rev. 1372282
Windows Vista Home Premium with Service Pack 1 installed (64-bit version) {computer is Ibuypower, Intel Core i7-3630QM CPU @ 2.4 GHz; 16GB installed RAM}
User avatar
Zizi64
Volunteer
Posts: 11494
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Count of elapsed days between monthly dates

Post by Zizi64 »

but I don’t know how to get the calculations to be correct from month to month, as the number of days between the 10th day of consecutive months changes throughout the year.
You can calculate only the elapsed days CORRECTLY, but you can not calculate the elapsed months CORRECTLY.

Half of the February is 14 days or sometimes it is 14,5 days, half of January is 15,5 days, half of the April is 15 days, and so on...
You should check what your starting and ending months are, and how many days there are in the months in between.
The main question is: are equals the (the half of the February of a non-leap year plus half of January) with the (half of July plus half of August); ... or they are not equals?

And you can operate with "average 30 day months" based on the elapsed days.
Calculate the elapsed days first (by a simple substraction), and them divide it by 30; the integer part of the result means the "average months" and the remainder of the division will be the rest days.

Of course it will not give you a PRECISE result (check the first day of the months in the conditionally formatted yellow rows):
Elapsed MonthsDays.ods
(47.29 KiB) Downloaded 5 times
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Locked