I am very, very new to SPSS -- and I'm sorry that this is probably an extremely basic question.

I have survey results in Excel. This gives seven questions with numeric scores and then text comments for each question. There are a 100 surveys.

The tasks I'd like to accomplish are:

1. Determine the number of comments per survey. For example, if there was one comment for each possible question would give a maximum of 7 for each survey. Some will have zero others will have a comment for each.

2. Count comments by Question. So, for Question 2 there were 80 comments (out of 100). For question 3, there were 50, etc.

3. Count comments by Question and by Score.

For question 2 there were 70 comments. Those that scored 10 had 6, score 9 had 12, score 8 had 23, score 7 had 14, score 6 had 18, etc.

Also -- on all of the above, I'd like to add the Percent of Total for each along with the count.

I can do this in Excel with some work. I would count cells where ISTEXT is true. Then perhaps do a COUNTIF for each score value.

But now, moving these tasks to SPSS -- would I start (after importing) by coding some new variables and then running Frequencies of some kind? Or perhaps a cross tab report would work?

Thanks for your help.

I have survey results in Excel. This gives seven questions with numeric scores and then text comments for each question. There are a 100 surveys.

The tasks I'd like to accomplish are:

1. Determine the number of comments per survey. For example, if there was one comment for each possible question would give a maximum of 7 for each survey. Some will have zero others will have a comment for each.

2. Count comments by Question. So, for Question 2 there were 80 comments (out of 100). For question 3, there were 50, etc.

3. Count comments by Question and by Score.

For question 2 there were 70 comments. Those that scored 10 had 6, score 9 had 12, score 8 had 23, score 7 had 14, score 6 had 18, etc.

Also -- on all of the above, I'd like to add the Percent of Total for each along with the count.

I can do this in Excel with some work. I would count cells where ISTEXT is true. Then perhaps do a COUNTIF for each score value.

But now, moving these tasks to SPSS -- would I start (after importing) by coding some new variables and then running Frequencies of some kind? Or perhaps a cross tab report would work?

Thanks for your help.

I raised the point value and will close this out and learn about this solution.

I should have asked about ordinal or interval based analysis first -- to get a better feel for how SPSS works. But I think I can learn a lot of that here with the coding of variables and the code language also.

Thanks for your expertise and a great solution.

All Courses

From novice to tech pro — start learning today.

I will note before getting into this that SPSS is designed primarily for working with ordinal-, interval- and ratio-scale data (i.e. not text/comments), so a number of these methods may seem clunky.

Frequencies and crosstabs will also only work for counts, which doesn't work for string-based variables. Blank strings and strings with content are both considered "content." Thus you have to rely on length computations.

Open a syntax file (New>Syntax) to enter code. This basic format should work:

IF (CHAR.LENGTH(v1) > 0) v1dc=1.

IF (CHAR.LENGTH(v2) > 0) v2dc=1.

IF (CHAR.LENGTH(v3) > 0) v3dc=1.

IF (CHAR.LENGTH(v4) > 0) v4dc=1.

EXECUTE.

Just add as many lines for as many variables as you've got and change "v1" to "v4" for whatever your comment variables are called. That will create a set of dummy coded variables (1 for comment present, blank value for no comment).

In order to convert the missing values to 0s, use this statement:

RECODE v1dc v2dc v3dc v4dc (SYSMIS=0).

EXECUTE.

...the results of which you can then sum through a COMPUTE statement:

COMPUTE totalComments = v1dc + v2dc + v3dc + v4dc.

EXECUTE.

After you have all of your code in one syntax file, go to the Run menu and select All. Make sure that you keep all of the EXECUTE statements.

After you do this, you should be able to run a Crosstabs on your numeric data versus your dummy codes.

For #1: Run Case Summaries (Analyze>Reports>Case Summaries) on your totalComments column. Deselect "Display Cases" at the bottom, open the Statistics submenu, remove whatever is there, and add "Sum". Or:

SUMMARIZE

/TABLES=totalComments

/FORMAT=NOLIST TOTAL

/TITLE='Case Summaries'

/MISSING=VARIABLE

/CELLS=SUM.

For #2: Run Frequencies (Analyze>Descriptives>Cros

FREQUENCIES VARIABLES=v1dc v2dc v3dc v4dc

/ORDER=ANALYSIS.

For #3: Run Crosstabs (Analyze>Descriptives>Cros

CROSSTABS

/TABLES=v1dc v2dc v3dc v4dc BY survey1 survey2 survey3 survey4

/FORMAT=AVALUE TABLES

/CELLS=COUNT

/COUNT ROUND CELL.

I've also posted all the code in the snippet below. If you replace v1 v2 etc with your comment variable names and survey1 survey2 etc with your quantitative variable names, you could copy this entire code snippet and run it as a block in SPSS to get all the analyses you want.

Open in new window