getSafeNumbers[grid_,{row_,col_}]:=Block{rownum,colnum,submatrix},rownum=Cases[grid〚row〛,Except[X,_Integer]];colnum=Cases[grid〚All,col〛,Except[X,_Integer]];submatrix=Cases[#,Except[X,_Integer]]&@FlattenWhichrow≤3&&col≤3, Take[grid,3,3],row≤3&&col≤6, Take[grid,3,4;;6],row≤3&&col≤9, Take[grid,3,7;;9],row≤6&&col≤3, Take[grid,4;;6,3],row≤6&&col≤6, Take[grid,4;;6,4;;6],row≤6&&col≤9, Take[grid,4;;6,7;;9],row≤9&&col≤3, Take[grid,7;;9,3],row≤9&&col≤6, Take[grid,7;;9,4;;6],row≤9&&col≤9, Take[grid,7;;9,7;;9];Complement[Range[9],Union[rownum,colnum,submatrix]]