开发者

How can I get a random cell in OpenOffice Calc?

I've perused the Stack Exchange list of sit开发者_高级运维es, and I can only think that SO is the right place to ask this (I saw a few excel questions, at least).

I have an array of values Sheet1.B3:B9. On another sheet, I'm trying to get a random value from one of those cells.

I suppose it has to be something with the RANK() function, but I'm grasping at straws.

How can I get the value of a random cell in that range?


In LibreOffice Calc to get a random cell between cells B3 and B9 of Sheet1 you can do:

=INDEX(Sheet1.B3:B9, RANDBETWEEN(1,5))


In Excel, this will give random lookup into the range

=INDEX(Sheet1!$B$3:$B$9,INT(RAND()*7)+1)

Or you can give your source data range a name

=INDEX(RandDataSource,INT(RAND()*ROWS(RandDataSource))+1)

Don't know if it applies to Openoffice

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜