Solved

Excel User Function to Calculate Date Minus One Year

Posted on 2015-01-06
8
130 Views
Last Modified: 2015-01-07
I am looking for a custom function for Excel 2010 that will take a date such as 5/25/2015 and turn it into 5/25/2014. I am entering dates of receipts for 2014.  When I enter 5/25 it defaults to 2015 when I want to be 2014.
0
Comment
Question by:Alex972
8 Comments
 
LVL 47

Expert Comment

by:Wayne Taylor (webtubbs)
Comment Utility
You can use this formula...

    =DATE(YEAR(A1)-1, MONTH(A1), DAY(A1))

...where cell A1 contains the date.
0
 
LVL 12

Expert Comment

by:Alan3285
Comment Utility
Hi,

If you enter a date with only the day / month, excel assumes you mean the current year.

One way to make it use 2014 instead, is to just adjust your computer clock to a year ago while you are doing the data entry, and then change it back again after.

Alan.
0
 
LVL 18

Accepted Solution

by:
krishnakrkc earned 500 total points
Comment Utility
Or you can use this formula as well.

=EDATE(A1,-12)

Kris
0
 
LVL 31

Expert Comment

by:Rob Henson
Comment Utility
Expanding on Alan's comment, Excel assumes current year so for entries where you know it is prior year ensure you enter the year as well, ie 5/25/14.

Thanks
Rob H
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 50

Expert Comment

by:barry houdini
Comment Utility
If you have a range of date values which all have the year 2015 but you need them to be 2014 then a quick way to change them all without formulas is as follows:

put 365 in any blank cell and copy that cell
select range of dates to convert then "right-click" and choose "Paste Special" from menu and in the dialog box under "operation" choose "subtract"
Choose "OK" then press "Esc" key

You may need to reformat the dates in your required date format

regards, barry
0
 
LVL 31

Expert Comment

by:Rob Henson
Comment Utility
Or do a Find & Replace for 2015 replacing with 2014.
0
 
LVL 50

Expert Comment

by:barry houdini
Comment Utility
Hey Rob,

Nice one - I didn't know that would work with real dates, assumed it would only work with text values

Learn something every day........

regards, barry
0
 

Author Closing Comment

by:Alex972
Comment Utility
Works well in my test and I like it that is short as well as dynamic.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

In this article I will provide some simple productivity hacks that will help you use Google to specifically show results from any web site (Experts-Exchange.com in my example), with minimal effort in Chrome and Firefox. I've seen a common theme a…
Lately there has been a variety of news related to U.S. employment.  Stories about worker productivity, automobile and airline unions, low employment and foreign laborers have frequented the news.  Each story has good and bad attributes we might arg…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now