Test to see if date was the last day of month

I need a formula to return a 1 if the date (lets say  A1) was the last day of the month or a 0 if it was not. I have a long list of dates and I just need to pull out the month end dates from each range.
wilpitzAsked:
Who is Participating?
 
zorvek (Kevin Jones)Connect With a Mentor ConsultantCommented:
Use this formula:

=IF(DATE(YEAR(A1),MONTH(A1)+1,0)=A1,1,0)

Kevin
0
 
wilpitzAuthor Commented:
That did it!
0
 
barry houdiniCommented:
If A1 is the last day of the month then the next day will be the 1st, so you can just test that, i.e.

=IF(DAY(A1+1)=1,1,0)

regards, barry
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.