Search code examples
excelchartsoffset

Display dataset in Horizontal bar with offset in the Excel?


I have the following table

Start End Duration (years)
Bob Larkin September 1, 1924 October 1, 1932 8
Ed Jenkins January 1, 1925 September 1, 1943 18
Speed Dash March 15, 1925 March 1, 1930 4
Old Walrus January 20, 1926 May 5, 1927 1
Lester Leith January 1, 1929 June 1, 1943 14
Bob Zane June 7, 1930 July 21, 1934 4

I'd like to generate a horizontal bar chart with starting points for the bars according to their respective start date.


Solution

  • Excel represents dates as days since 1900. If you create a stacked bar chart for the start dates and the duration in days you get 2 bars for each person: one from the lower limit of the horizontal axis (1900-1-1) to the start date and another one from the start date to the end date. Make the the first ones invisible.

    After some tweaking of the axes (set limits of horizontal axis to 8767 and 15950, and revert vertical axis) I get this:

    chart