This program automates most of the writing of a longer program to create count variables for each ICD code of interest. You start with an Excel or other file with two vars/columns. One with each code of interest, and a corresponding one with the label for each of those codes. You import this data into SPSS (can use the import wizard). Then run the attached SPSS program to create the syntax for a potentially much longer program which will count the occurrences of each ICD code. You just copy and paste the variable *values* of this program into another syntax file to create this longer program. Then aggregate the counts however you like. I’m sure there are many other ways to do this, but this seemed novel enough to share.