Solved

excel previous month in yyyymm format

Posted on 2016-07-20
3
102 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 29

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 49

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 29

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

776 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