Dynamic offset etc

OC2PS

New Member
Joined
Jan 18, 2018
Messages
11
I have 2 sets of data, for 2 indicators, over time. Format shown below (of course, the data sets are much bigger)

Data set 1 (indicator A)
[TABLE="width: 500"]
<tbody>[TR]
[TD]City[/TD]
[TD]2009[/TD]
[TD]2010[/TD]
[TD]2011[/TD]
[TD]2012[/TD]
[TD]2013[/TD]
[TD]2014[/TD]
[TD]2015[/TD]
[TD]2016[/TD]
[TD]2017[/TD]
[/TR]
[TR]
[TD]Airdrie[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]7[/TD]
[TD]8[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]Brooks[/TD]
[TD]9[/TD]
[TD]8[/TD]
[TD]7[/TD]
[TD]8[/TD]
[TD]4[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Calgary[/TD]
[TD]4[/TD]
[TD]7[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]8[/TD]
[TD]7[/TD]
[TD]6[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Duncan[/TD]
[TD]7[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]8[/TD]
[TD]7[/TD]
[TD]9[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]Edmonton[/TD]
[TD]3[/TD]
[TD]5[/TD]
[TD]2[/TD]
[TD]8[/TD]
[TD]9[/TD]
[TD]7[/TD]
[TD]9[/TD]
[TD]9[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Fernie[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]8[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]8[/TD]
[TD]7[/TD]
[TD]9[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Greenwood[/TD]
[TD]6[/TD]
[TD]7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D]
[TD][/TD]
[TD]8[/TD]
[TD]1[/TD]
[TD]5[/TD]
[TD]2[/TD]
[TD]5[/TD]
[TD]3[/TD]
[TD]9[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]Fernie[/TD]
[TD][/TD]
[TD][/TD]
[TD]9[/TD]
[TD]1[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]Greenwood[/TD]
[TD]5[/TD]
[TD]5[/TD]
[TD]8[/TD]
[TD]7[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]9[/TD]
[TD]9[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Hamilton[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]9[/TD]
[TD]8[/TD]
[TD]1[/TD]
[TD]5[/TD]
[TD]8[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Iqaluit[/TD]
[TD]8[/TD]
[TD]9[/TD]
[TD]8[/TD]
[TD]7[/TD]
[TD]5[/TD]
[TD]9[/TD]
[TD]1[/TD]
[TD]6[/TD]
[TD]7[/TD]
[/TR]
</tbody>[/TABLE]

I would like to run a few simple analyses on these:
  1. Scatter plot Indicator A v Indicator B (across countries and across years), just to see whether there is a correlation (or some relationship) between the 2 indicators.
  2. Scatter plot Indicator A v % change in Indicator B (across countries and across years), to see whether there is a correlation between indicator A and the speed of change in B.
  3. As you can see in the table above, Indicator B starts getting values for some cities after a few columns. I would like to plot the first x years of indicator B in a line chart or something, BUT with an offset when looking at years. So that rather than the plot starting in column 2 for every single city, the first value for each city should be the first cell for the city that has a number. And so on...

Is there a simple and direct way of doing this, short of manually manipulating data (e.g. copying columns for each year below each other in each data set for analysis #1 , etc)?

Greatly appreciate any help!

****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="width: 500"]
<tbody>[TR]
[TD]City[/TD]
[TD]2009[/TD]
[TD]2010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TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

</body>
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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