Count values of a variable based on another variable

#1
How can I count the number os Grantees that have used the ipad to collect participants information. In this case, 2 grantees CA0083 and CA0214 used the ipad. My variables are agency, datamode (excel, ipad and scan). This is a clinet level dataset.

DataMode
Agency EXCEL IPAD SCAN Total
AK0001 0 0 79 79
AK0011 0 0 24 2a
AL0080 0 0 770 770
AL0212 0 0 248 248
AR0015 0 0 669 669
AZ0002 0 0 252 252
CA0006 0 0 4,953 4,953
CA0020 0 0 696 696
CA0083 0 586 0 586
CA0214 176 87 0 263


Thanks,
Marvin
 

maartenbuis

TS Contributor
#2
Code:
clear
input str6 Agency EXCEL IPAD SCAN Total
"AK0001" 0 0 79 79
"AK0011" 0 0 24 20
"AL0080" 0 0 770 770
"AL0212" 0 0 248 248
"AR0015" 0 0 669 669
"AZ0002" 0 0 252 252
"CA0006" 0 0 4953 4953
"CA0020" 0 0 696 696
"CA0083" 0 586 0 586
"CA0214" 176 87 0 263
end

count if IPAD > 0 & IPAD < .
 
#3
Hi Maarten,

This was the output of: tab Grantee datamode. So my actual data is individual level. Is this make sense to you?

ID Grantee datamode
36 IL0152 SCAN
37 IL0152 SCAN
38 IL0152 SCAN
39 IL0150 paper
40 IL0150 paper

Thank you