Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Test to see if date was the last day of month

Posted on 2013-06-12
3
Medium Priority
?
371 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
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…

730 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