Sign in to join the conversation:
Hi
Need to determine how many days in the current year (365 or 366) to be used in a calculation. Can anyway suggest how to determine how many days in the current year?
Cheers
Simon
There are a few ways do do this. The most straightforward being
=YEARDAY(DATE(2019, 12, 31))
This will give you the year day (1 - 365 or 366) for whatever date you specify. In this case it would be the last day of the year.
You can automate the date to look at this year, next year, previous year, etc, you can leave it as manual entry within the formula, or you can use various options for cell referencing to change the entire date or the year, or many other possibilities.
Or, if you just want a simple Yes/No (is this year a leap year), divide the current year by 4, then compare that to the integer version.
"Int(currentYear/4)=currentYear/4" should return a True/False matching "Is this year a leap year"
Thanks Paul and Corey, based on your input i used the below:
=YEARDAY(DATE(YEAR([Due Date]1), 12, 31)) = 365 or 366
Provides number of days in year, based on the date contained in another cell [Due Date].
Excellent Use. Happy to help!
I submitted a ticket, but thought I would ask here. I am having an issue with sheets that I own (our org is on a Business plan). For the last two years, we have been using the sheets without an issue - our admin and many Editors (all shown as Guest since they are outside of our organization) were able to edit the sheets…
Hello! I’ve noticed for a LONG time that when I change the name of a column in a source sheet, the corresponding column in reports breaks, which then causes dashboard widget charts (that rely on those reports) to fail. Is there a way to: Prevent this issue when renaming columns? Fix existing reports and dashboards without…
Dear All, my account was suspended for a long period in which my sheets were deleted. I renewed my account and asked technical support if my sheets could be recovered. I received this message below, but I do not seem to get a reply back afterwards and still do not have my sheets recovered. Thanks for…