With 2 helper columns, you can try something like this:
A3:A20 = your data
B3 = IF(A3=0,500,ROW()) (Copy down)
C3 = SMALL(B$3:B$20,ROW()-2) (Copy down)
D3 = OFFSET(A3,INDIRECT("C"&RANDBETWEEN(ROW(),ROW()+COUNTIF(C3:C20,"<500")-1))-ROW(),0)
Hope this helps.
Originally Posted by kathyxyz
Bookmarks