Complex Chart Series

ToniShinobi

New Member
Joined
Sep 19, 2008
Messages
27
I'd like to create a 3D chart, but the values for 3 different charts that i want to create are integrated together in the table.

The format of my Table is:

Column B contains a Location Name
Row 5 Contains Cells that are merged 3 at a time starting at Column C (so C5 is merged with D5 and E5, containing 12 AM, F,G,H5 contain 1 AM, so on until 11PM)
Row 6 From column C onwards contains individual titles for the below columns, 3 for each hour above (We'll say "Title1", "Title2", "Title3" are in cells C6, D6, E6, and continue in that pattern for each hour. F,G,H6 contain "Title1", "Title2", etc...).

I would like to make 3 charts.
Each series in a single chart will be of Title "Location" from B, and values C,F,I,L,... in the corresponding location. Notice the Values skip 2 in order to pick up only Values under the header "Title1".

The next chart will do the same thing, but with values from D,G,J,...
Last chart is the same with E,H,K,...

What can i do to automate this? Is this possible?
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Does your sheet look something like this? I've color coded the cells corresponding to the charts and series as I understand your needs; did I get it right?
Book1
BCDEFGHIJKLMNOPQ
512:00 AM1:00 AM2:00 AM3:00 AM4:00 AM
6LocationTitle1Title2Title3Title1Title2Title3Title1Title2Title3Title1Title2Title3Title1Title2Title3
7Loc A37.262063.17815435.1274111.5523646.6616495.8906521.7620797.4562316.919859.3834686.3558792.9983883.5500450.3608929.69909
8Loc B69.4395252.0690765.369964.44848437.817111.7944473.2521542.3476314.080630.39100819.9781420.2638749.6723696.0567822.62912
9Loc C7.41599347.6150322.1262169.2010371.7744512.0021877.1573551.7224270.641273.5829239.5084342.4587881.591290.68887582.06296
10Loc D52.3210820.0706338.153027.04453326.8623233.3154312.1868860.0777599.7372594.4639939.7108169.8940870.098422.96494618.76839
11Loc E74.7384720.5482137.1395678.0531110.8218592.1327754.2772943.8476129.5591659.0707251.1514281.1015432.037961.3101445.8482
12Loc F12.8957440.6883149.035219.70288346.720442.9250185.0862491.090759.9791126.8437633.3231190.33856.69746841.1585877.75763
13
14LegendChart 1Chart 1Chart 3
15Series 1
16Series 2
17Series 3
18Series 4
Sheet1
 
Upvote 0
I think the easiest approach will be to create a range of cells somewhere else on the sheet, or even on another worksheet within the workbook, to extract the values you need for each chart. I'll post a sample once I work it up.
 
Upvote 0
Here's what I've got. I use the OFFSET function to "point" to the cell which corresponds to the time and Location needed for each series. I have room to post two of the groups, the third is similar:
ToniShinobi.xls
BCDEFGH
512:00 AM1:00 AM
6LocationTitle1Title2Title3Title1Title2Title3
7Loc A37.262063.17815435.1274111.5523646.6616495.89065
8Loc B69.4395252.0690765.369964.44848437.817111.79444
9Loc C7.41599347.6150322.1262169.2010371.7744512.00218
10Loc D52.3210820.0706338.153027.04453326.8623233.31543
11Loc E74.7384720.5482137.1395678.0531110.8218592.13277
12Loc F12.8957440.6883149.035219.70288346.720442.92501
13
14Title112:00 AM1:00 AM2:00 AM3:00 AM4:00 AM5:00 AM
15Loc A37.2620611.5523621.7620759.3834683.550040
16Loc B69.439524.44848473.252150.39100849.672360
17Loc C7.41599369.2010377.157353.58292381.591290
18Loc D52.321087.04453312.1868894.4639970.098420
19
20Title212:00 AM1:00 AM2:00 AM3:00 AM4:00 AM5:00 AM
21Loc A3.17815446.6616497.4562386.3558750.360890
22Loc B52.0690737.817142.3476319.9781496.056780
23Loc C47.6150371.7744551.722429.508430.6888750
24Loc D20.0706326.8623260.0777539.710812.9649460
Sheet1


To get the formula for the third chart, create the same column headings and row headings, type Title3 in cell B26, copy the formula from cell C21 and paste it in cell C27, then change it as follows:
Before:
Code:
=OFFSET($B$6,MATCH($B21,$B$7:$B$12),MATCH($B$20,$C$6:$E$6)+3*(C$20-$C$20)*24)
After:
Code:
=OFFSET($B$6,MATCH($B27,$B$7:$B$12),MATCH($B$26,$C$6:$E$6)+3*(C$26-$C$26)*24)
After making these four changes (the three instances of 20 become 26, the one instance of 21 became 27), copy the formula down and across. These edits make the formula look to the group three headings instead of group 2.

Obviously, you'll be replacing "Title1" with the real title, etc.
 
Last edited:
Upvote 0
Thank you.... I'm assuming that there isn't a way to get that to go directly into a chart instead of filling cells first for the chart. I separated all of the data into 3 tables manually for the chart. If it was possible to place functions in a chart as a series, i'm sure this offset function would have done wonders for my situation.
 
Upvote 0
Well, there is a way. A macro can be built that will step across the data grabbing every nth column and adding it to a chart. I've done it before when I was adding a large number of series to an xy scatter plot, each series had a different size range of x and y from the other series.
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,226
Members
452,620
Latest member
dsubash

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