Need help with random number generator

daniel_dani95

New Member
Joined
Jan 30, 2023
Messages
16
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm working on some sort of quiz and I want to generate some amount of random numbers (specifically 80) which will represent question that is in cell with that number and then excel will over VLOOKUP find and display that question. I have question bank of 2500 questions. I found through this site that I can use RANDBETWEEN function to generate random numbers and then this,
Excel Formula:
=1+RANK.EQ(B2,$B$2:$B$81)+COUNTIF($B$2:B2,B2)-1
, in another column to make numbers unique.

My problem is that when generating unique numbers, RANDBETWEEN function gives numbers in range from 1-2500 but the other function give only numbers up to 80, never above, let alone 2500.

What did I do wrong?

Thanks for help in advance
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
How about
Excel Formula:
=TAKE(SORTBY(SEQUENCE(2500),RANDARRAY(2500)),80)
This will return 80 distinct numbers from 1 to 2500
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,842
Messages
6,174,981
Members
452,597
Latest member
Barny72

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top