Updating Graphs using OFFSET (conversion to 2007)

The_Ant

New Member
Joined
Feb 28, 2008
Messages
33
A few years ago I made a worksheet for with sales data. Every day I upload the daily sales per product group into a sheet. At the moment I have a sheet full of sales data per day. In the old excel (post 2007) I had a great graph that showed me the sales over time, per product group. In a cell I would enter the product group name, and only that product group would appear in the graph. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
The created the following formula can named it IndexProduct (therefore the formula was not in a cell but a name):<o:p></o:p>
=OFFSET(indirect(Product Name),,,MATCH(End Date,DATES,0))<o:p></o:p>
However all the data overtime would appear in the graph. I now want to be able to select the start date and end date.<o:p></o:p>
I changed the formula to:<o:p></o:p>
=OFFSET(indirect(Product Name),MATCH(Start Date,DATES,0),,MATCH(End Date,DATES,0)- MATCH(Start Date,DATES,0))<o:p></o:p>
The problem starts that Excel 2007 give me an error when changing the dates in the second formula. The worksheet was created in the old excel. I converted it to 2007, and it work fine. However, now I want to change the dates, I get a error. The worksheet is saved as .xlsm<o:p></o:p>
Furthermore, if possible I want the date on the horizontal axis to adjust to the correct dates.<o:p></o:p>
Does anybody have a solution for this?<o:p></o:p>
I don’t know if the size of the data has anything to do with it. To give an indication, I have a bout 30 product groups and +-600 daily entries per group.<o:p></o:p>
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Please post the actual original formula, by copying it and pasting it into a reply. You can't have done that already because range names can't contain spaces and indirect isn't capitalised.
 
Upvote 0
This is my formula (The Sheet name have to be in the formula, otherwise it doesn't work):

=OFFSET(INDIRECT(VLOOKUP(Stockview!$C$2,ADMIN!$A$2:$C$29,3,0)),MATCH(Stockview!$D$2,INDEX!$A$5:$A$1000,0),,MATCH(Stockview!$D$3,INDEX!$A$5:$A$1000,0)-MATCH(Stockview!$D$2,INDEX!$A$5:$A$1000,0))

The Vlookup formula, translates the product to a range that indirect can read. All product have a named range.

Let me know if more information is needed.
 
Upvote 0
Not totally. The formula works in 2007. But i want to change the start date, i get the error. It says that the formula is incorrect, where nothing has changed in the formula.
 
Upvote 0
Are you saying that you can change the start date in Excel 2003 without getting an error? In what way are you changing the formula you posted?
 
Upvote 0
In 2003 I had no problems with the formula. I can't see how it reacts in 2003, as i only have the 2007 version availible.
In 2007, i seem to get an error when changing the start date. I've tried a smaller range and it seems to work fine. However, when increasing the range i get an error that the formula is not correct. However all i've done is increased the range.
The I don't want to change the formula, i want to change the cell "Start date" in "Stockview!$D$2". I can't seem to see the error in the formula. I don't know if the formula is too long for excel?
 
Upvote 0
Stockview!$C$2 = Product name
ADMIN!$A$2:$C$29 = Table with product name to range name

e.g.

<TABLE style="WIDTH: 139pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=184><COLGROUP><COL style="WIDTH: 71pt; mso-width-source: userset; mso-width-alt: 3437" width=94><COL style="WIDTH: 68pt; mso-width-source: userset; mso-width-alt: 3291" width=90><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 71pt; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=20 width=94>Product name</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; WIDTH: 68pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" width=90>RANGE Name</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=20>Alpha</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0">IndexAlpha</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=20>Beta</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0">IndexBeta</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=20>Charlie</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0">IndexCharlie</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=20>Delta</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0">IndexDelta</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0" height=20>Echo</TD><TD style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0">IndexEcho</TD></TR></TBODY></TABLE>

The Index name coinside with range names for each product.
 
Upvote 0

Forum statistics

Threads
1,214,823
Messages
6,121,777
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top