d2=IF($A2="Variable",MIN(IF(($B$2:$B$18=$B2)*($A$2:$A$18<>"Variable"),$C$2:$C$18))&"-"&MAX(IF(($B$2:$B$18=$B2)*($A$2:$A$18<>"Variable"),$C$2:$C$18)),"")
Try this array (Confirm with Ctrl+Shift+Enter) formula and copy towards down