Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Forcing Dates Forward.

Forcing Dates Forward

Written by Allen Wyatt (last updated December 16, 2023)
This tip applies to Excel 97, 2000, 2002, and 2003


Roger is keeping track of invoices in an Excel worksheet. All of the invoices need to be submitted with a due date of the 28th of the month, and Roger wondered if there was a way to force a date to always "jump forward" to the next instance of the 28th.

The cleanest way to force dates forward is to create a formula that will examine a date in a cell, and then force that date to the next desired date, such as the 28th. The following formula is a good one to start with:

=IF(DAY(A1)>28,DATE(YEAR(A1),MONTH(A1)+1,28),DATE(YEAR(A1),MONTH(A1),28))

This formula examines the date in cell A1. If the DAY value of the date is greater than 28, then the formula constructs and returns a date that is equal to the 28th of the next month. If it is less than or equal to 28, then the 28th of the current month is returned.

There is an even shorter way to render an acceptable formula, however—one that entirely gets rid of the IF function:

=DATE(YEAR(A1),MONTH(A1)+(DAY(A1)>28),28)

This uses the current year as the year, and the day is always 28. The month uses a Boolean calculation. If the day is greater than 28 then (Day(A1)>28) will be TRUE and will calculate as a 1, thereby adding 1 to the current month. If it is less than or equal to 28 it will be FALSE and calculate as a 0, just calculating the current month.

If you don't want to be "strict" giving some people only a day (4/27/2012 will give a due date of 4/28/2012), you could plan on giving them at least a week with the formula:

=DATE(YEAR(A1),MONTH(A1)+(DAY(A1)>21),28)

This would give the 28th of the current month for the 1st thru 21st, but for later dates it will jump to the 28th of the following month.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2410) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Forcing Dates Forward.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Renaming Worksheets Based On a List

Renaming a worksheet within a macro is a relatively easy task. When you start renaming based on a range of names, though, ...

Discover More

Finding and Changing Word's Internal Commands

If you know how to create macros, you can easily create entire replacements for Word's internal commands. Here's all you ...

Discover More

Misbehaving Rulers

When upgrading from Word 2000 to 2002, many people have a problem with the Ruler function. This tip explains how to fix ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (menu)

Calculating a Date Five Days before the First Business Day

Excel allows you to perform all sorts of calculations using dates. A good example of this is using a formula to figure ...

Discover More

Calculating Averages by Date

When you have a huge amount of daily data to analyze, you may want to calculate an average of values for any given date ...

Discover More

Calculating the Day of the Year

Need to know what day of the year a certain date is? You can figure it out easily using the formulas in this tip.

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is seven more than 1?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.