You are on page 1of 5

Frequency tables and cross tabs in Excel

Getting your data into Excel is just the first step!

After that, you have to analyze your data.

Some things that make life easier are the following

Always have the column names visible

To do this, select row 2. Then go to the Window menu, and select freeze panes.
Voila! No matter where you are in the file you can see which column is which.

Rather than consulting the IPUMS documentation all the time for the value labels for
each variable (which tell you that STATEICP value 33 is Minnesota), you can just
download the syntax file. It is a plain text file, so you can just open it in Notepad or
Word.

Now it looks a mess with all the SPSS code, but you can just remove that with
find and replace, and in a few minutes you can have a nice plain list of variables
and their labeled values you could hand out to students.

Frequency table

1. Insert a new worksheet by right-clicking on the worksheet name at the bottom left
of the screen.
2. Copy the values and labels for the variable you wish to do a frequency of, to the
new sheet.
3. It should look something like this (the example is for the variable BLIND)

A B C
1 Blind values Label Frequency
2 1 No (blank)
3 2 Yes
4 8 Illegible
5 9 Unknown
6

4. Select the cell C2 [where you want the frequency table to start], and then select
down to the same row as the last cell with a value in it [in this case, C5].
5. From the Insert menu, choose Function, Statistical Function, and Frequency.
6. This will give you a dialog box for the data array and the bins array. The bins
array is the values that will occur in the data.
7. To select the data, click in the little red, white and blue box at the end of the data
array dialog, and then select the data sheet again.
8. Select the first cell in the column you want a frequency for that has data [dont
select the variable name], and then press Ctrl-Shift-Down Arrow to select all the
data in that column.
9. Now click the little red, white and blue box again.
10. Then click the little red, white and blue box for the bins array, and select all the
values for the variable you want. In this case, you are selecting rows 2-5 where
the numbers are 1,2,8,9.
11. Now click the little red, white and blue box again.
12. Click Ctrl-Shift-Enter.

You should have a frequency table

Cross tabulation

1. Cross tabulations require that the two data columns be adjacent. You can drag
columns by selecting them, and moving the cursor so its immediately between
two columns. You can then drag the selected column [yes, its a pain]
2. Once you have the columns adjacent, select both of them including the variable
names all the way to the bottom.

You can do this easily by selecting the variable names and then Ctrl-Shift-
Down Arrow.

3. Now go to the Data menu, and select Pivot Table and Pivot Chart Wizard. For the
first dialog box you just want to ignore it and click Next
4. Since youve already selected the data, your data will already be in the little
dialog box for the data range. Click Next.
5. Then youll be asked where you want to put the data. Choose New Worksheet
the default option.
6. On the same dialog box, click Layout. Drag one of the variable names to a row,
and another to a column.
7. Then drag one of the variables into the data field.
8. It will then say Sum of [VARIABLE NAME], but dont worry well change
that later.
9. Click OK, and then Finish
You should now have a table that looks a bit like this

Sum of NCHILD BLIND


NCHILD 1 2Grand Total
0 0 0 0
1 430 1 431
2 584 584
3 639 639
4 808 808
5 690 690
6 642 642
7 406 406
8 384 384
9 369 369
Grand Total 4952 1 4953

10. Right click on the cell that says Sum of VARIABLE, and select the option Field
Settings towards the end of the menu.
11. Now youll have a chance to select that you want a count instead of a sum. Select
Count
12. You can click OK and just get a basic frequency cross-tabulation, but
proportions are more meaningful, so click on Options
13. The Show Data as dialog allows you to choose to display row, column or table
percentages. Choose whatever one is most useful, and youre done.

If you left click in the top left cell of the table, it will select it all, and you can copy and
paste the table into a Word document.

You can also replace the numeric values with the value labels to make the table more
meaningful.
Summarizing the values of a variable according to the values of another one or two

How about if you want to know, the average age of women and men?

Or, the average age by sex and race?

Once youve mastered the above, this is pretty straightforward.

1. Select the columns you want.

If you want to know the average age by one variable, select age and that
variable. If you want to know it by two, select those variables and age.

Of course, for age you could substitute any value you can make an average
of (but be sure to read the variable descriptions for things like income and
wages . you have been warned!)

2. Go to the data menu, and select Pivot Table, and Select Next until you get to the
last screen, then select Layout
3. Drag sex and race (your categorical variables) onto the rows and columns.
4. Drag age (your continuous variable) onto the DATA part.
5. Click OK, and then click finish.
6. Your table will look a bit like this.

Count of AGE SEX


RACE 1 2(blank) Grand Total
1 2559 2786 5345
2 334 404 738
3 15 25 40
4 36 32 68
5 8 6 14
6 67 74 141
7 206 198 404
8 68 64 132
9 4 6 10
(blank)
Grand Total 3297 3595 6892

But what you want is not a Count of AGE but an average!

7. Right click on Count of AGE and then select Field Settings again.
8. In the Summarize By dialog, select Average.
9. You can now adjust the number of decimal places, and you will have a table that
looks more like this;
Average of AGE SEX
RACE Men Women(blank) Grand Total
White 35.88 38.15 37.06
Black 31.28 34.39 32.99
American Indian 31.60 34.80 33.60
Chinese 31.39 37.19 34.12
Japanese 45.50 40.67 43.43
Other Asian or PI 28.64 34.16 31.54
Other race,n.e.c 24.35 24.75 24.55
Two or more races 22.50 24.67 23.55
Three or more races 40.50 12.33 23.60
(blank)
Grand Total 34.23 36.60 35.47

10. Now type in proper labels and you have a nicely formatted table.

You might also like