You can then use a simple branching conditional... IF B2 AND #A THEN 'DO SMTH ELSEIF B2 AND #Y THEN 'DO SMTH ELSE ENDIF