Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 18
Default Dynamic source data based on Today

I am creating a production barchart that is updated daily. I want the chart
to plot from 3 days old to 4 days in the future. I would like the middle of
the chart to represent today. Tomorrow's data will become today's data when
everything shifts by one at midnight.

I am pretty new to macro so please speak in laymans terms.
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 66
Default Dynamic source data based on Today

No need for a macro. Adapt the ideas at
Dynamic Charts
http://www.tushar-mehta.com/excel/ne...rts/index.html
particularly example 2
--
Tushar Mehta
http://www.tushar-mehta.com
Custom business solutions leveraging a multi-disciplinary approach
In Excel 2007 double-click to format may not work; right click and select
from the menu


"SPISO" wrote:

I am creating a production barchart that is updated daily. I want the chart
to plot from 3 days old to 4 days in the future. I would like the middle of
the chart to represent today. Tomorrow's data will become today's data when
everything shifts by one at midnight.

I am pretty new to macro so please speak in laymans terms.

  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 18
Default Dynamic source data based on Today

What if there is not any set number of future days in my data table. For
example, some times we have 4 days in the future and other times we have
scheduled 10 days in the future.

I still only want the chart to show Today in the middle, 4 days in the
future, and 3 days in the past in the chart.

"Tushar Mehta" wrote:

No need for a macro. Adapt the ideas at
Dynamic Charts
http://www.tushar-mehta.com/excel/ne...rts/index.html
particularly example 2
--
Tushar Mehta
http://www.tushar-mehta.com
Custom business solutions leveraging a multi-disciplinary approach
In Excel 2007 double-click to format may not work; right click and select
from the menu


"SPISO" wrote:

I am creating a production barchart that is updated daily. I want the chart
to plot from 3 days old to 4 days in the future. I would like the middle of
the chart to represent today. Tomorrow's data will become today's data when
everything shifts by one at midnight.

I am pretty new to macro so please speak in laymans terms.

  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 66
Default Dynamic source data based on Today

Suppose you have the data in cols. A and B with row 1 as the header. Further
suppose you have the 'center date' and the number of past days and number of
future days to show in individual cells named as below.

All the names are sheet-level names.

CenterDate =Sheet1!$D$2
NbrFutureDays =Sheet1!$D$4
NbrPastDays =Sheet1!$D$3

Now, create the 3 named formulas below and plot XVals and YVals as the
x-values and y-values of the series.

AllXVals =OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1!$A:$A)-1,1)
XVals =OFFSET(Sheet1!$A$2,MATCH(Sheet1!CenterDate,Sheet1 !AllXVals,0)-1-Sheet1!NbrPastDays,0,Sheet1!NbrPastDays+Sheet1!Nbr FutureDays+1,1)
YVals =OFFSET(Sheet1!XVals,0,1)

--
Tushar Mehta
http://www.tushar-mehta.com
Custom business solutions leveraging a multi-disciplinary approach
In Excel 2007 double-click to format may not work; right click and select
from the menu


"SPISO" wrote:

What if there is not any set number of future days in my data table. For
example, some times we have 4 days in the future and other times we have
scheduled 10 days in the future.

I still only want the chart to show Today in the middle, 4 days in the
future, and 3 days in the past in the chart.

"Tushar Mehta" wrote:

No need for a macro. Adapt the ideas at
Dynamic Charts
http://www.tushar-mehta.com/excel/ne...rts/index.html
particularly example 2
--
Tushar Mehta
http://www.tushar-mehta.com
Custom business solutions leveraging a multi-disciplinary approach
In Excel 2007 double-click to format may not work; right click and select
from the menu


"SPISO" wrote:

I am creating a production barchart that is updated daily. I want the chart
to plot from 3 days old to 4 days in the future. I would like the middle of
the chart to represent today. Tomorrow's data will become today's data when
everything shifts by one at midnight.

I am pretty new to macro so please speak in laymans terms.

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
Source Data - Values - Dynamic Range possible? BR Charts and Charting in Excel 2 March 10th 09 10:23 AM
Dynamic PivotTable Data Source Lenardz Excel Discussion (Misc queries) 1 August 22nd 07 08:08 PM
Need Dynamic Data source help [email protected] Charts and Charting in Excel 11 May 1st 07 06:52 PM
updating pivot tables using dynamic data source dab4211 Excel Discussion (Misc queries) 3 July 24th 06 09:30 PM
Dynamic references in diagram source data? Olzki Excel Discussion (Misc queries) 0 March 1st 05 08:33 AM


All times are GMT +1. The time now is 06:29 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"