2 Replies Latest reply on Sep 4, 2017 6:59 PM by Lisa Pitney

    Summing Grouped Data

    Lisa Pitney

      Hello,

       

      In working in my independent study, I have data by county and state that is coded into age groups. I need to sum the [tot pop] for each county if the [agegrp] = 14, 15, 16, 17, 18. This will give me the population 65 & older by county/state.

       

      The data is in US County Population Data (age). Here is a sample of data for one of the counties:

      STATE

      COUNTY

      FIPS

      STNAME

      CTYNAME

      YEAR

      AGEGRP

      TOT_POP

      17

      1

      17001

      Illinois

      Adams County

      1

      0

      67103

      17

      1

      17001

      Illinois

      Adams County

      1

      1

      4232

      17

      1

      17001

      Illinois

      Adams County

      1

      2

      4240

      17

      1

      17001

      Illinois

      Adams County

      1

      3

      4264

      17

      1

      17001

      Illinois

      Adams County

      1

      4

      4620

      17

      1

      17001

      Illinois

      Adams County

      1

      5

      4107

      17

      1

      17001

      Illinois

      Adams County

      1

      6

      4035

      17

      1

      17001

      Illinois

      Adams County

      1

      7

      3701

      17

      1

      17001

      Illinois

      Adams County

      1

      8

      3808

      17

      1

      17001

      Illinois

      Adams County

      1

      9

      4108

      17

      1

      17001

      Illinois

      Adams County

      1

      10

      4889

      17

      1

      17001

      Illinois

      Adams County

      1

      11

      4933

      17

      1

      17001

      Illinois

      Adams County

      1

      12

      4498

      17

      1

      17001

      Illinois

      Adams County

      1

      13

      3921

      17

      1

      17001

      Illinois

      Adams County

      1

      14

      3179

      17

      1

      17001

      Illinois

      Adams County

      1

      15

      2471

      17

      1

      17001

      Illinois

      Adams County

      1

      16

      2106

      17

      1

      17001

      Illinois

      Adams County

      1

      17

      1968

      17

      1

      17001

      Illinois

      Adams County

      1

      18

      2023

       

      I tried an If Then statement, but have errors I can't fix.

       

      I am hoping then to put it on the map showing which counties have more people over 65.

       

      Thanks for all your help!

      Lisa