excel randomly select from array code example Example: randomly assign value from one column to cell =INDEX(data,RANDBETWEEN(1,ROWS(data)),1)