Fix this function

Column A - represents Years
Ex: =IF(A2<5,(RANDBETWEEN(30,50)),(RANDBETWEEN(40,60)))

I want that the function “random between” to be applied between “30;50” if the no. of years are less than 5, and if it’s greater than 5, the function to be applied between “40;60”

Sorry for this questions, i’m new to this stuff, and I need it for a project

  1. Did you realise tha A2=5 might also occur?

  2. =IF(A2<5;RANDBETWEEN(30;50);RANDBETWEEN(40;60))

If your locale uses the comma as parameter (‘function’) delimiter you may replace the semicolons - or your system may do it automatically for you.

IF() is a standard function with three parameters: (1) Condition, (2) IfYesExpression, (3) IfNoExpression. You had used parentheses in a not accepted role.

Thank you so much