The RANDBETWEEN formula is the quiet workhorse behind a lot of business magic. It powers everything from fair lead routing and A/B test splits to randomized survey samples and training simulations. In Google Sheets and Excel, it returns an integer between a lower and upper bound, refreshing whenever the sheet recalculates. That volatility is useful for exploring scenarios, but it also means you need structure: fixed seeds, value-only copies, and guardrails so your reports don’t mysteriously change overnight.
Delegating RANDBETWEEN-heavy workflows to an AI computer agent unlocks a different level of control. Instead of manually typing formulas, dragging them down thousands of rows, and remembering when to paste-as-values, the agent can create, copy, lock, and document every randomization step for you at scale. It can run in both Google Sheets and Excel, orchestrate multi-step processes, and still keep a transparent log so your team knows exactly how every random number was generated.
If you run a business, agency, or sales team, RANDBETWEEN is probably hiding somewhere in your spreadsheets already. It’s the formula that quietly decides which leads get which offer, which prospects get called first, or which creative a contact sees. Used well, it brings fairness and experimentation into your operations. Used manually at scale, it burns hours.
Below are the top ways to use RANDBETWEEN effectively—first by hand, then with an AI agent that can take over the repetitive parts.
RANDBETWEEN’s syntax is simple:
=RANDBETWEEN(bottom, top)
Step-by-step in Google Sheets or Excel:
=RANDBETWEEN(1,100).Pros:
Cons:
Common use case: assign leads or tasks randomly to reps.
Example in Google Sheets or Excel:
=RANDBETWEEN(1,1000000).Now the list is randomized. You can slice the top 20 rows for a test group, or split evenly across your team.
Pros:
Cons:
Often you want RANDBETWEEN to generate numbers once, then stop.
In Excel:
=RANDBETWEEN(...).In Google Sheets:
Pros:
Cons:
For sales and marketing teams, a classic pattern is “pick one random item from a list.”
Formula: =INDEX(A2:A201, RANDBETWEEN(1, COUNTA(A2:A201)))
Step-by-step:
Pros:
Cons:
Manual RANDBETWEEN workflows fall apart when:
This is where an AI computer agent shines. Instead of you being the “macro” that clicks and copies, the agent becomes the operator: opening files, writing formulas, converting values, logging what happened, and doing it the same way every time.
Imagine describing a workflow like this to an AI agent:
Step-by-step at a high level:
bottom, top), and when to freeze values.Pros:
Cons:
Once an AI agent reliably handles RANDBETWEEN in one spreadsheet, you can scale horizontally:
At that point, RANDBETWEEN stops being “that little function someone knows” and becomes a controlled, documented part of your operating system—run by a tireless digital teammate instead of your own clicking hand.