I need that Stata will do something if a global is equal to the value 7 or 8 (or in a range). I have stumbled upon Nick's answer (https://www.stata.com/statalist/arch.../msg00810.html) which is in the direction of what I am looking for -
Code:
if strpos("$global", "7") {
 ...
 }
But I do not know how to make this argument a range or more than one number.