Solved

excel previous month in yyyymm format

Posted on 2016-07-20
3
81 Views
Last Modified: 2016-07-20
I need a cell that will pull the previous month in this format yyyymm.
For instance, this is July, so I need the cell to populate 201606 (june 2016)
August should be 201607

Also, I need a rolling 12 month also, so if the result is 201607, I need another cell to populate 201508

Can anyone help??
0
Comment
Question by:Euro5
  • 2
3 Comments
 
LVL 28

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41721439
You may have the following formula in any cell...

=EOMONTH(TODAY(),-1)

Open in new window

and then custom format the formula cell with yyyymm.

Now for another date you may have something like....
=DATE(YEAR(TODAY())-1,MONTH(TODAY())+1,1)

Open in new window

1
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 41721440
Hi,

you could try ( with the right format "yyyymm" )
=DATE(YEAR(TODAY()),MONTH(TODAY()),0)
=DATE(YEAR(TODAY()),MONTH(TODAY())-10,0)

Open in new window

Regards
EE20160720.xlsx
0
 
LVL 28

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41721441
Or you may replace the second formula with this....

=EOMONTH(EDATE(A2,-12),2)

Open in new window

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

746 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

14 Experts available now in Live!

Get 1:1 Help Now