China Naming Network - Auspicious day query - Excel random lottery code

Excel random lottery code

As shown in the figure, C2 formula:

= LARGE(IF(COUNTIF(c $ 1:c 1,ROW($ 1:$30))=0,ROW($ 1:$30),RANDBETWEEN( 1,3 1-ROW(a 1)))

Array formula, CTRL+SHIFT+ Enter, drop down;