Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Rolling Formula based on If

I have a graph that uses formula's gathering information from different
worksheets and other workbooks. The 'x' axis label inputs dates based on the
current formula which reads a specific set of cells from another sheet.
These dates currently are set and show an entire 12 month period or year on
each worksheet. (this can be changed)

My question: Is there a way to create a formula that will roll
automatically showing the previous 12 months of information from today's date.

example: If today is March 15, 2007, I want the graph to show March 15,
2007 thru March 15, 2006 of the previous year's input.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Rolling Formula based on If

Not sure if its the best, but I'd use
=DATE(YEAR(TODAY()),MONTH(TODAY())-1,DAY(TODAY()))

And change the number being subtracted for each month you want to go back.
--
Best Regards,

Luke M


"Kristine" wrote:

I have a graph that uses formula's gathering information from different
worksheets and other workbooks. The 'x' axis label inputs dates based on the
current formula which reads a specific set of cells from another sheet.
These dates currently are set and show an entire 12 month period or year on
each worksheet. (this can be changed)

My question: Is there a way to create a formula that will roll
automatically showing the previous 12 months of information from today's date.

example: If today is March 15, 2007, I want the graph to show March 15,
2007 thru March 15, 2006 of the previous year's input.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,180
Default Rolling Formula based on If

This approach will let you click on the year
that you want and display it on the graph.
Not exactly what you want, but you can probably
tailor it to your needs.
No VBA code required.
Familiarity with defined names helpful.
Assume you have 3 sheets named Y2005 to Y2007
and one named CData.
Each year has named data like this:
Year
2006

Date Val
01/01/06 1
01/02/06 1.63
01/03/06 2.32
01/04/06 2.41
01/05/06 2.70
01/06/06 3.28

On the CData sheet, you have similar data like this:
Name them as shown.

LegendS Spindex
2006 2006

DateS ValS
01/01/06 1.00
01/02/06 1.63
01/03/06 2.32
01/04/06 2.41
01/05/06 2.70

The formulas for LegendS, DateS and ValS a
=INDIRECT("Y"&Spindex&"!Year")
=INDIRECT("Y"&Spindex&"!Date")
=INDIRECT("Y"&Spindex&"!Val")

Plot CData!DateS and CData!ValS
Source Data Name CData!LegendS
While on the chart page, get the Spinner
from the Forms toolbar and place it on the chart.
Right-click the Spinner Format Control Control
Min Value =2005
Max Value = 2007
Cell Link = CData!Spindex
The Spinner will let you go back and forth
between the years and display that year.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
rolling twelvemnoths formula for attendance calendar QD Excel Worksheet Functions 2 September 3rd 06 08:32 AM
Formula for calculating 12 month rolling period Stroodle Excel Discussion (Misc queries) 0 August 17th 06 03:16 PM
How do I change column data based on dynamic (rolling) dates? fergusbell Excel Discussion (Misc queries) 1 July 25th 06 10:29 AM
Formula for calculating a rolling 12 month average in excel? Jeff Excel Discussion (Misc queries) 1 December 9th 05 09:11 PM
Z Chart i.e. top rolling annual bottom rolling monthly middle cum. wat prin Excel Worksheet Functions 0 January 28th 05 03:43 PM


All times are GMT +1. The time now is 03:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"