Solved

Display last 36 months based on current month/ year

Posted on 2013-06-12
7
308 Views
Last Modified: 2013-06-26
Hi,

I have string field where I get current month as:

06.2013

I want to make matrix based on this current month for last 36 months as:

02.2011     03.2011   04.2011  ... ... .. .. ... . . . . 02.2013   03.2013  04.2013  05.2013  06.2013

Please provide a formula to achieve it.

I don't want to use off-set function as not supported by Dashboards.

Thanks.
0
Comment
Question by:NickHoward
  • 4
  • 3
7 Comments
 
LVL 92

Expert Comment

by:Patrick Matthews
Comment Utility
Enter this formula into A1...

=TEXT(DATE(YEAR(NOW()),MONTH(NOW())-36+COLUMN(),1),"mm.yyyy")

Now, copy that across through AJ1
0
 

Author Comment

by:NickHoward
Comment Utility
Hi.

Thanks but I don't want to use system time to caculate current month. This month/ year has to be calculated from a cell where month/ year is displatyed as string 06.2013

Hope I get revised formula soon.

Nick
0
 
LVL 92

Expert Comment

by:Patrick Matthews
Comment Utility
>>from a cell where month/ year is displatyed [sic] as string 06.2013

Is that the actual value entered in the cell, or just the displayed number format?

If the value is itself entered as a date, then just change my formula for A1 to:

=TEXT(DATE(YEAR($A$5),MONTH($A$5)-36+COLUMN(),1),"mm.yyyy")

Changed $A$5 to the real cell holding the value.

If it is actually entered as text...

=TEXT(DATE(YEAR(SUBSTITUTE($A$5,".","/1/")),MONTH(SUBSTITUTE($A$5,".","/1/"))-36+COLUMN(),1),"mm.yyyy")
0
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!

 

Author Comment

by:NickHoward
Comment Utility
I have cell A5 holding text value 06.2013

When I used formula:

=TEXT(DATE(YEAR(SUBSTITUTE($A$5,".","/1/")),MONTH(SUBSTITUTE($A$5,".","/1/"))-36+COLUMN(),1),"mm.yyyy")

Excel said error in formula and it highlights SUBSTITUTE. No further error information.

Please advise
0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
Comment Utility
The attached spreadsheet has working examples of both of my approaches described in http:#a39242064

Q-28155292.xls
0
 

Author Closing Comment

by:NickHoward
Comment Utility
Worked like wonder.

Thanks a lot.
0
 

Author Comment

by:NickHoward
Comment Utility
Hi  matthewspatrick.

Just a quick fix otherwise I open new case.

What about if I only have "2013" (current year text without month like above). How I can off-set to 2012, 2011, 2010??

Thanks.
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

728 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

13 Experts available now in Live!

Get 1:1 Help Now