It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
nm, figured it out. My bad. Using wrong formula.
Post edited January 02, 2016 by OldFatGuy
This question / problem has been solved by sunshinecorpimage
How about =ROUND((20*RAND()),0) ?
(^ actually a pretty good example of not how to do it, since it's from 0-20 and 0&20 are less likely than 1-19)

I had a quick look here: https://help.libreoffice.org/Calc/Mathematical_Functions#RAND

ah nvm
Post edited January 02, 2016 by Matewis
avatar
OldFatGuy: nm, figured it out. My bad. Using wrong formula.
=RANDBETWEEN(1;20)

Darn, you ninja'd me answering your own question.
Post edited January 02, 2016 by sunshinecorp
avatar
OldFatGuy: nm, figured it out. My bad. Using wrong formula.
Now I'm curious... what was the original question? From the replies I assume it was something along the lines of how to get a random number between 1 and 20 and why what you tried didn't work... so what did you try yo begin with?
Post edited January 02, 2016 by Maighstir
avatar
OldFatGuy: nm, figured it out. My bad. Using wrong formula.
avatar
sunshinecorp: =RANDBETWEEN(1;20)
yeah, I figured that out and that's why I edited it.

But now here's the problem. In Excel, I could make a whole column of RANDBETWEEN numbers and they would recalc every time I hit the enter key. For example, I could place the cursor in a blank cell, and hit "Enter" five times, and all the random numbers in the column would change. So I could generate five columns of random numbers, sum them, copy and paste numbers only, and have one set of results, then just hit "enter" and have all the original random numbers regenerate, sum them, copy and paste numbers only, and compare the results. It was an easy and fast way to get for example a total of five die between 1 and 20 for player A, then hit "enter" and have a new total for player B, etc. etc.

When I hit "enter" in Libreoffice, nothing. I can't for the life of me get it to recalc, and I can't remember the recalc key (was it F-something in Excel???) and if I have to point to each cell individually and hit a recalc key that's going to turn the easy into unbearable.

I guess I'm going to have to break down and buy Excel again.
avatar
OldFatGuy: nm, figured it out. My bad. Using wrong formula.
avatar
Maighstir: Now I'm curious... what was the original question? From the replies I assume it was something along the lines of how to get a random number between 1 and 20 and why what you tried didn't work... so what did you try?
I was using the wrong formula, RAND instead of RANDBETWEEN. I figured it out and edited my original text. But now I have a new problem. LOL
Post edited January 02, 2016 by OldFatGuy
avatar
sunshinecorp: =RANDBETWEEN(1;20)
avatar
OldFatGuy: yeah, I figured that out and that's why I edited it.

But now here's the problem. In Excel, I could make a whole column of RANDBETWEEN numbers and they would recalc every time I hit the enter key. For example, I could place the cursor in a blank cell, and hit "Enter" five times, and all the random numbers in the column would change. So I could generate five columns of random numbers, sum them, copy and paste numbers only, and have one set of results, then just hit "enter" and have all the original random numbers regenerate, sum them, copy and paste numbers only, and compare the results. It was an easy and fast way to get for example a total of five die between 1 and 20 for player A, then hit "enter" and have a new total for player B, etc. etc.

When I hit "enter" in Libreoffice, nothing. I can't for the life of me get it to recalc, and I can't remember the recalc key (was it F-something in Excel???) and if I have to point to each cell individually and hit a recalc key that's going to turn the easy into unbearable.

I guess I'm going to have to break down and buy Excel again.
avatar
Maighstir: Now I'm curious... what was the original question? From the replies I assume it was something along the lines of how to get a random number between 1 and 20 and why what you tried didn't work... so what did you try?
avatar
OldFatGuy: I was using the wrong formula, RAND instead of RANDBETWEEN. I figured it out and edited my original text. But now I have a new problem. LOL
RANDBETWEEN() is not a volatile function like RAND() is. It recalculates only when the input values change. So you need to either reload the file or press Ctrl+Shift+F9.
avatar
sunshinecorp: RANDBETWEEN() is not a volatile function like RAND() is. It recalculates only when the input values change. So you need to either reload the file or press Ctrl+Shift+F9.
Well that's a sucky difference between Excel and LibreOffice then. I'm assuming the Ctrl+Shift+F9 will recalc ALL cells with that in them? I guess that's almost as easy as just hitting enter like I did in Excel.

Thanks for the help. I'm gonna give you the five points for helping so much even though my original question was stoooopid and I figured it out myself... LOL
avatar
sunshinecorp: RANDBETWEEN() is not a volatile function like RAND() is. It recalculates only when the input values change. So you need to either reload the file or press Ctrl+Shift+F9.
avatar
OldFatGuy: Well that's a sucky difference between Excel and LibreOffice then. I'm assuming the Ctrl+Shift+F9 will recalc ALL cells with that in them? I guess that's almost as easy as just hitting enter like I did in Excel.

Thanks for the help. I'm gonna give you the five points for helping so much even though my original question was stoooopid and I figured it out myself... LOL
Try =INT(RAND() * (20 - 1) + 1) for a volatile function.
avatar
OldFatGuy: Well that's a sucky difference between Excel and LibreOffice then. I'm assuming the Ctrl+Shift+F9 will recalc ALL cells with that in them? I guess that's almost as easy as just hitting enter like I did in Excel.

Thanks for the help. I'm gonna give you the five points for helping so much even though my original question was stoooopid and I figured it out myself... LOL
avatar
sunshinecorp: Try =INT(RAND() * (20 - 1) + 1) for a volatile function.
Or =FLOOR(20*RAND())+1
Post edited January 02, 2016 by Maighstir
There's nothing excel can do that calc can't do. Don't buy into Microsoft's piece of shit software. :)
avatar
OldFatGuy: Well that's a sucky difference between Excel and LibreOffice then. I'm assuming the Ctrl+Shift+F9 will recalc ALL cells with that in them? I guess that's almost as easy as just hitting enter like I did in Excel.

Thanks for the help. I'm gonna give you the five points for helping so much even though my original question was stoooopid and I figured it out myself... LOL
avatar
sunshinecorp: Try =INT(RAND() * (20 - 1) + 1) for a volatile function.
It's alright, the CTRL+SHIFT+F9 works just as ENTER did in Excel, just as fast (ALL columns regenerate) that's just a touch more trouble (holding down two keys while striking a third instead of just striking a key). Not a big deal. I can live with that.

I only have to do this in between seasons (for this game) so it's not a biggie. FTR, I do an awful lot of my own "house rules" or whatever you want to call it with games and my old computer with excel on it had a lot of spreadsheets already made to do what I wanted for each game. Unfortunately that old PC died, and it has an old hard disk (not SATA) and so I'm just remaking them now as I play each game. Been a couple of years since I played FPS Football Pro 96. Still way better than Madden IMO (if you're just interested in coaching, Madden is definitely a better arcade game if you're interested in playing and taking control of your players).

Thanks again for all of your help. Sorry for the really dumb questions lately, but hey, I'm known for asking dumb questions often here. I have a reputation to keep up you know... LOL
avatar
OldFatGuy: Thanks again for all of your help. Sorry for the really dumb questions lately, but hey, I'm known for asking dumb questions often here. I have a reputation to keep up you know... LOL
The only dumb questions are the ones with no answer. You're welcome. :)
avatar
sunshinecorp: Try =INT(RAND() * (20 - 1) + 1) for a volatile function.
I don't think that will ever give a 20 will it? Because INT rounds down

Apologies for being stupidly pedantic :P
Post edited January 02, 2016 by Matewis
avatar
sunshinecorp: Try =INT(RAND() * (20 - 1) + 1) for a volatile function.
avatar
Matewis: I don't think that will ever give a 20 will it? Because INT rounds down

Apologies for being stupidly pedantic :P
You're right. What Maighstir suggested will give 20 (=FLOOR(20*RAND())+1)
avatar
Matewis: I don't think that will ever give a 20 will it? Because INT rounds down

Apologies for being stupidly pedantic :P
avatar
sunshinecorp: You're right. What Maighstir suggested will give 20 (=FLOOR(20*RAND())+1)
I was thinking that =CEILING(20*RAND()) might work, but realised that RAND() can give 0 (at least I think it's between 0 and 0.999...) and CEILING(20*0) is still 0, so FLOOR()+1 is the easiest for that result.
Post edited January 02, 2016 by Maighstir