You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Help with a vacation countdown formula

I have a formula that I have used both in Excel and in Libre Office without changing it. It counts from today to a future date and looks like this:


Libre Office (I don't use Excel anymore, but I didn't have to change it for LO):

Formula:

Output:


In Numbers:

Formula:

Output:


Is there a different formula I could use that would output the number of days without the "d" at the end so that it will correctly (for my purposes) read as ### Days? Or a different way to use this formula?


While I've had Numbers for ages, I was using Excel until last year, when I decided I didn't want to continue paying for the MS 365 subscription. So I switched to Libre Office, which is free. But, since Numbers is also basically free, as it comes with Mac OS, why not give it a shot?


Thanks for whatever help you might have for me!


Nora

(macOS Ventura 13.2.1)


Posted on Feb 25, 2023 2:27 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 26, 2023 2:08 AM

Hi Nora,

you could also use DATEDIF - Apple Support

No additional cell needed!


Formula for B3= DATEDIF(TODAY(),B2,"D")& " Days"



Or you can go with

Formula for B4= DATEDIF(TODAY(),B2,"M")&" Month + "&DATEDIF(TODAY(),B2,"MD")&" Days"

Then your countdown will show month & days.



Based on your region the , or the ; will be used to separate the different sections of a formula. If you write one thousand as 1,000.00 then the , is used as your formula separator. If you write one thousand as 1.000,00 then the ; is used as your formula separator.


Hope this will solve your question, please let me know if this worked for you or if something in unclear.


Regards Ralf




7 replies
Question marked as Top-ranking reply

Feb 26, 2023 2:08 AM in response to Noritamar

Hi Nora,

you could also use DATEDIF - Apple Support

No additional cell needed!


Formula for B3= DATEDIF(TODAY(),B2,"D")& " Days"



Or you can go with

Formula for B4= DATEDIF(TODAY(),B2,"M")&" Month + "&DATEDIF(TODAY(),B2,"MD")&" Days"

Then your countdown will show month & days.



Based on your region the , or the ; will be used to separate the different sections of a formula. If you write one thousand as 1,000.00 then the , is used as your formula separator. If you write one thousand as 1.000,00 then the ; is used as your formula separator.


Hope this will solve your question, please let me know if this worked for you or if something in unclear.


Regards Ralf




Feb 25, 2023 10:42 PM in response to Noritamar

Some background information regarding Date and Time values in Numbers, followed by another solution to your question.


In Numbers, a Date & Time value always includes a Date part and a Time part.


If you enter only a 'time of day', Numbers automatically sets the Date part to the date on which the entry was made.

If you enter only the Date part, Numbers automatically sets the Time part to 00:00:00 (Midnight, at the beginning of that day).

In these two cases, the default format shows only the part ( date or time) that has been entered, but the actual value in the cell where this was entered includes both the entered part and the other part, calculated by the application.


The result of subtracting one Date & Time value from another is a Duration, whose units are indicated by a one or two letter label automatically applied to the result (example: the d in your result.


Fortunately, Numbers also supports a set of DURto… functions that will convert a Duration in Weeks, Days, Hours, Minutes, Seconds or milliseconds to a Number, to which you can append a word label matching the unit in which the Duration value has been expressed by the number.


Example:

The formula shown below the table is entered as shown in cell B2, then filled down to cell B5. Numbers automatically increments the row of 'A2' to match the row containing that copy of the formula.


On rows containing a Date (and time) value, the formula calculates the duration between that date and 'today', converts the result to a number representing that duration as a number (of days), then appends a space and the word "Days" to that number, as shown in column B.


In Row 5, DURATION interprets the empty cell in column A as containing a numerical value of 0, tries to subtract that value from the Date and Time value 'TODAY', and throws the error message seen in the example below:


The same situation occurs in row 6, but here the formula has been revised to recognize that error, abandon the calculation, and place a null string in the cell. The null string is a text value with a length of zero, making its cell appear to be empty, as seen in B6 of the first image.


With the whole formula placed in a single cell, there is no need for a 'reference cell'


Regards,

Barry


Feb 26, 2023 4:47 AM in response to Ralf-F

Yes! This was exactly what I wanted, Ralf, so thank you! While Numbers is a spreadsheet like Excel and Libre Office Calc, it's sufficiently different that I really need to do some studying. Where can I go to find useful study materials (free) to get myself up to speed? Mind you, this is strictly for my own edification, as I'm now retired and don't need it for work, but I still want to do things the right way.


Again, thanks!

Help with a vacation countdown formula

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.