Making random number global for use with subtotals