Now the reverse engineering is a bit trickier. You could use 49 IF statements in one cell or use solver to find maximum argument for COMBIN result to be less or equal than position number. Instead let's use a table of 6 by 49 and use MATCH function where resulting row number would be the argument and a ball number. If you make column headings from 6 to 1 (B1:G1) in descending order and row labels of 1 to 49 (A2:A50) in ascending order (vertically ascending in Excel means numbers growing from top to bottom). Then if you fill up the table with formula COMBIN($A2,B$1) starting from left top corner. $ signs will make sure that index values are always taken from heading row and label column. Replace #NUM! with zeros. You should get something like this: