Yes, the data needs some processing first.
The formula in column E only needs to be =65-D1. A lot of people learn to
insert a formula using the big sum button on the toolbars, which inserts
=SUM() and lets you select cells or type something in the parentheses. This
leads people to believe that SUM is needed for any formula, but it's not
necessary.
In a practice worksheet, I set up a range like your A:E. In H1:K8 I set up a
little table:
Lower Upper Range Count
0 5 0-5 3
6 10 6-10 4
11 15 11-15 5
16 20 16-20 6
21 25 21-25 8
26 30 26-30 4
31 31+ 0
The first three columns are easy. Cell K2 contains this array formula:
=SUM(IF($E$2:$E$37>=H2,IF($E$2:$E$37<=I2,1,0),0))
where E2:E37 is the range containing the years until retirement (change it
to match yours). This formula is not entered simply by pressing Enter:
instead hold Ctrl+Shift while pressing Enter, which makes it an array
formula. If done correctly, Excel will put {curly brackets} around the
formula. Fill this formula down to K7, and in K8 enter this shorter array
formula:
=SUM(IF($E$2:$E$37>=H8,1,0))
Hold Ctrl+Shift while pressing Enter.
Now select the data in columns J and K and create a column chart. The range
column gives the category labels and the Count column gives the column
heights.
- Jon