# Random number in cells

**URL:** <https://community.glideapps.com/t/random-number-in-cells/72876>\
**Category:** Ask for Help\
**Created:** [April 26, 2024, 9:02am UTC](https://community.glideapps.com/t/random-number-in-cells/72876 "2024-04-26T09:02:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vladimir](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vladimir/32/73681_2.png) [@Vladimir](https://community.glideapps.com/u/Vladimir)\
**Post date:** [April 26, 2024, 9:02am UTC](https://community.glideapps.com/t/random-number-in-cells/72876/1 "2024-04-26T09:02:30Z")

</div>

Hi guys. The following question arose: how to make sure that random numbers are generated once a minute, say from 10 to 90?

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [April 26, 2024, 11:28am UTC](https://community.glideapps.com/t/random-number-in-cells/72876/2 "2024-04-26T11:28:14Z")

</div>

So you want one random number generated every minute… and that number should be between 10-90…. or did you want something else?

---

<div class="post-metadata">

**Author:** ![Vladimir](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vladimir/32/73681_2.png) [@Vladimir](https://community.glideapps.com/u/Vladimir)\
**Post date:** [April 26, 2024, 11:35am UTC](https://community.glideapps.com/t/random-number-in-cells/72876/3 "2024-04-26T11:35:54Z")

</div>

Yes, this is exactly what I need for the assignment, but I just can’t do it.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 26, 2024, 11:57am UTC](https://community.glideapps.com/t/random-number-in-cells/72876/4 "2024-04-26T11:57:30Z")

</div>

- Create a Math column using the following formula:

```auto
Year(Now)*10^8
+ Month(Now)*10^6
+ Day(Now)*10^4
+ Hour(Now)*10^2
+ Minute(Now)

```

- Create a Template column that concatenates the Math column with a RowID column.
- Use that template column as the seed for a Roll Dice column with 80 sides.
- Use another math column to add 10 to the Roll Dice column

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [April 26, 2024, 12:00pm UTC](https://community.glideapps.com/t/random-number-in-cells/72876/5 "2024-04-26T12:00:49Z")

</div>

Another way is like this…

1.Add a math column with minute(now)

2.Add a roll dice column with sides 80 and use the math column for the seed.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 26, 2024, 12:03pm UTC](https://community.glideapps.com/t/random-number-in-cells/72876/6 "2024-04-26T12:03:16Z")

</div>

> [@Eric\_Penn](#):
>
> Add a roll dice column with sides 80 and use the math column for the seed.

I like this. Math column is roll+10, no?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 26, 2024, 12:04pm UTC](https://community.glideapps.com/t/random-number-in-cells/72876/7 "2024-04-26T12:04:19Z")

</div>

ooops, I misread. I thought it was supposed to change every ten minutes. I’ll update my response.

Your solution is okay, except that:

- the numbers will repeat every 60 minutes
- it will give the same result on every row

The above may or may not be a problem.

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [April 26, 2024, 12:05pm UTC](https://community.glideapps.com/t/random-number-in-cells/72876/8 "2024-04-26T12:05:49Z")

</div>

Ya i just realized that will only give me 60 numbers and they could be predicted

---

<div class="post-metadata">

**Author:** ![Vladimir](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vladimir/32/73681_2.png) [@Vladimir](https://community.glideapps.com/u/Vladimir)\
**Post date:** [April 26, 2024, 12:13pm UTC](https://community.glideapps.com/t/random-number-in-cells/72876/9 "2024-04-26T12:13:51Z")

</div>

Thank you very much! Your answers helped me and I learned some things that will be useful to me soon!

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [April 26, 2024, 12:21pm UTC](https://community.glideapps.com/t/random-number-in-cells/72876/10 "2024-04-26T12:21:52Z")

</div>

Here’s my final approach

1. Math column configured → Minute(Now)

2. JS Column grabs timestamp when user opens app

```auto
date = new Date();
return date;

```

1. Template column to join Math column and JS column

2. Roll dice sides 60 with the template from step 3 for the seed

In my mind this approach was for a one row table

 ![Screenshot 2024-04-26 at 8.20.53 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/9/69187b486d5e6f406c5fa9e58b279bd137d80e8e.png)

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [May 3, 2024, 12:21pm UTC](https://community.glideapps.com/t/random-number-in-cells/72876/11 "2024-05-03T12:21:59Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
