2

I want to have the randbetween function only return a random number until a specific day, then stop changing. Is there a way to accomplish this in googlesheets?

=IF(today()<F1,randbetween(1,10),)

I tried something like this, but it would just go blank if it's false.

player0
  • 124,011
  • 12
  • 67
  • 124

1 Answers1

3

sure there is you just need to summon the animal overlord... and avoid using TODAY() directly in the formula

let F1 be your date
let F2 be =TODAY()

then use:

=IF(F2<F1, RANDBETWEEN(1, 10), 
 UNIQUE(REGEXEXTRACT(QUERY(SPLIT(FLATTEN(LEN(
 WHATTHEFOXSAY()&WHATTHEFOXSAY())&" "&TRANSPOSE(LEN(WHATTHEFOXSAY()&WHATTHEFOXSAY()))), " "), 
 "select Col1+Col2 label Col1+Col2''")&"", "\d$")+1))

enter image description here

demo sheet

to learn more about alchemy follow the great white fox

player0
  • 124,011
  • 12
  • 67
  • 124