Solved

Test to see if date was the last day of month

Posted on 2013-06-12
3
355 Views
Last Modified: 2013-06-12
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.
0
Comment
Question by:wilpitz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 500 total points
ID: 39242857
Use this formula:

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

Kevin
0
 

Author Closing Comment

by:wilpitz
ID: 39242865
That did it!
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 39242866
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question