I have a table with entered numbers (A:A) and specific dates (B:B). How could I randomly choose between entered number for each specific date?
In attached example, F2 should be random value between each number in A:A where B:B = 13.12.2022
I've tried playing with index and randbetween, but no result. I need formula for both Excel and Google Sheets.
Update: for Excel these do the trick
=INDEX($A$1:$A$30;INDEX(LARGE(($B$1:$B$30=D2)*ROW($A$1:$A$30);ROW($A$1:$A$30));1+INT(RAND()*COUNTIF($B$1:$B$30;D2))))
=MAP(D2:D4,LAMBDA(a,LET(x,FILTER(A2:A11,B2:B11=a),@SORTBY(x,RANDARRAY(COUNT(x))))))
But this doesnt work for Google Sheets.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.