I'm making for a community a random team selector but I'm getting a #NUM Error saying that Paramer 2 Value 20 or Parameter 2 Value 25 is out of range. From what I understand, they are not. Here is the link to it.The parameters referred by the function are in other sheets. Do you think this is a bug or am I doing something wrong? Thank you.Example:
Parameter X Value X is out of range (INDEX combined with RANDBETWEEN)
google spreadsheets
I see commands like         =index(Spain!A$2:A$19, randbetween(2,19))The second parameter of index is not the absolute row number but is relative to the range specified as the first argument. For example, =index(A$2:A$19, 1) refers to A2=index(A$2:A$19, 18) refers to A19=index(A$2:A$19, 19) throws an errorTo fix this, either change the range of randbetween: =index(Spain!A$2:A$19, randbetween(1,18))or, if you want to refer by absolute row numbers, use indirect: =indirect(Spain!A&randbetween(2,19))