Visualizing date ranges

sdspieg

Board Regular
Joined
Dec 9, 2013
Messages
98
Does anybody have any idea whether I would be able, with Excel, to transform a table containing information like this into a graph like the one underneath? Thanks!
#GP?NameYears#GPsSev.CountryInt.
1War of the League of Venice1495-149738FSA119
2Polish-Turkish War1497-149813T45
3Venetian-Turkish War1499-150314T60
4First Milanese War1499-150012F29
5Neapolitan War1501-1504218PS269
6War of the Cambrian League1508-1509310FSA145
7War of the Holy League1511-1514418PESA261
8Austro-Turkish War1512-1519224AT343
9Scottish War1513-151514E57
10Second Milanese War1515-151533FSA43
11First War of Charles V1521-1526330FE H420
12Ottoman War1521-1531268TH958
13Scottish War1522-152313E41
14Second War of Charles V1526-1529318FE H249
15Ottoman War1532-1535228TH384
16Scottish War1532-153414E55
17Third War of Charles V1536-1538232F H438
18Ottoman War1537-1547297TH1329
19Scottish War1542-1550113E176
20Fourth War of Charles V1542-1544247F H629
21Siege of Boulogne1544-154628FE107
22Arundel's Rebellion1549-155026FE79
23Ottoman War1551-1556244TH578
24Fifth War of Charles V1552-1556251F H668

<colgroup><col span="2"><col><col span="5"></colgroup><tbody>
</tbody>
fWofeSj6Nt-aHz0NkA2G0A84wG5O2MGNJXcze_eQQaF8iiz7pkmCfMq0hNIVq-6PLOKMwlGDuZxk9ll5LqhU-XZdoQ4kHhov7ylrGACDZ0KfETvKDtDM1g_dvA
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Yes, something similar can be plotted in Excel.

The original chart plots annual casualties on a logarithmic scale with a broken vertical axis, the little jog between 0 and 1,000 indicates the break. We weren't given the casualties but we have the "Severity", which is primarily based on the casualties, so those values were plotted. I avoided the broken axis, something Excel isn't good at showing, and I did not use a logarithmic scale. The log scale was used in the original because the 20th Century war casualties would reduce the earlier values to insignificance.

The original used one-half the casualty value for the first and last years of each war. Rather than complicate this example, I did not opt for this refinement. You may travel the path of nested IFs, but I avoid it when I can.

Reducing the data to only what was needed, I came up with these columns, extending from A1 to E25:
*ABCDE
1#YearsSev.first_yearlast_year
211495-1497814951497
321497-1498314971498
431499-1503414991503

<tbody>
</tbody>

Formulas:
Cell D2 and down: =VALUE(LEFT(B2,4))
Cell E2 and down: =VALUE(RIGHT(B2, 4))
Defined names, used later:
severity: = C2 and down
first_year = D2 and down
last_year = E2 and down

Then I constructed a table to summarize the data. Here is a fragment:
*GHIJ
1*123
21495800
31496800
41497830

<tbody>
</tbody>

Formulas:
Rich (BB code):
Cell H2:
    =IF(AND(war_year >= INDEX(first_year, MATCH(H$1, $A$2:$A$25, 0)),
    war_year <= INDEX(last_year, MATCH(H$1, $A$2:$A$25, 0))),
    INDEX(severity, MATCH(H$1, $A$2:$A$25, 0)), 0)

Copied through the table
Defined name:
war_year = G2 and down

I summed each row in the second table to get the data to plot. Again I'm showing only a fragment:
*AGAH
1*Total Severity
214958
314968
4149711
514983

<tbody>
</tbody>

Formulas:
Cell AH2 and down: =SUM(H2:AE2)

And here's the link to the scatter and bar charts that resulted:
 
Upvote 0

Forum statistics

Threads
1,203,757
Messages
6,057,178
Members
444,911
Latest member
Uncommon1

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