[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

excel previous month in yyyymm format

Posted on 2016-07-20
3
Medium Priority
?
176 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
[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
  • 2
3 Comments
 
LVL 33

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 53

Accepted Solution

by:
Rgonzo1971 earned 2000 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 33

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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

656 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