![]() |
If functions for dates
Hi I need to know if anyone can give me an IF Function that will calculate
the number of days remaining in a given month. For example, if the date is July 17th, the calculation would be 31-17+1=15 days. My problem is setting the citeria to recognize whether the month is a 31 day month/30 day month or 28/29 day month (I would prefer not having to enter in that information for each date). Please help! Thank you! |
Assuming you have entered your date in A1 then this formula should do it;
=DAY(DATE(YEAR(A1),MONTH(A1)+1,0))-DAY(A1)+1 Format the cell holding the formula as general. Hope this helps Rowan if function for remaining days in month wrote: Hi I need to know if anyone can give me an IF Function that will calculate the number of days remaining in a given month. For example, if the date is July 17th, the calculation would be 31-17+1=15 days. My problem is setting the citeria to recognize whether the month is a 31 day month/30 day month or 28/29 day month (I would prefer not having to enter in that information for each date). Please help! Thank you! |
Or more directly:
=DATE(YEAR(A1),MONTH(A1)+1,1)-A1 "Rowan" wrote: Assuming you have entered your date in A1 then this formula should do it; =DAY(DATE(YEAR(A1),MONTH(A1)+1,0))-DAY(A1)+1 Format the cell holding the formula as general. Hope this helps Rowan if function for remaining days in month wrote: Hi I need to know if anyone can give me an IF Function that will calculate the number of days remaining in a given month. For example, if the date is July 17th, the calculation would be 31-17+1=15 days. My problem is setting the citeria to recognize whether the month is a 31 day month/30 day month or 28/29 day month (I would prefer not having to enter in that information for each date). Please help! Thank you! |
All times are GMT +1. The time now is 02:49 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com