Hi- trying to set up variables for a Venn Diagram; essentially I need a count across three categories (binomial 0/1) and export to XSLX for overlap.

Right now I'm doing as follows:


Code:
gen MUAC125only=1 if GAMMUAC==1 & GAM==0 
replace MUAC125only2wayWHZ=0 if GAM==1 & GAMMUAC==1 

tab MUAC125only

gen GAMonly=1 if GAM==1 & GAMMUAC==0 
replace GAMonly=0 if GAMMUAC==1 & GAM==1 

tab GAMonly

gen WHZandMUACGAM=1 if GAMMUAC==1 & GAM==1
replace WHZandMUACGAM=0 if (GAMonly==1 | MUAC125only==1) 

gen WAZonly=1 if underweigh==1 & GAMMUAC==0 
replace WAZonly=0 if underweight==1 & GAMMUAC==0
Is there a faster way to do this?