Without VBA generate random unique numbers

jamiguel77

Active Member
Joined
Feb 14, 2006
Messages
378
Office Version
  1. 2016
  2. 2010
  3. 2007
Platform
  1. Windows
  2. Web
hi all, is possible?
Without VBA generate random unique numbers

use solver?

thanks
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Further to my previous point. Suppose you want to generate up to 20 unique random numbers from 100 to 119.
If you have Excel 365 with the SEQUENCE function then you can try the column A formula below. For any version from Excel 2000 on try the column C formula

20 10 20.xlsm
ABC
1Excel 365 with SEQUENCE FnExcel 2000+
2100117
3101104
4103118
5107106
6108110
7106105
8104102
9110114
10116119
11109108
12119112
13118109
14111107
15113113
16112115
17102101
18115111
19114100
20117103
21105116
Random Unique
Cell Formulas
RangeFormula
A2:A21A2=AGGREGATE(15,6,SEQUENCE(20,,100)/ISNA(MATCH(SEQUENCE(20,,100),A$1:A1,0)),RANDBETWEEN(1,20-COUNT(A$1:A1)))
C2:C21C2=AGGREGATE(15,6,ROW(INDEX(C:C,100):INDEX(C:C,119))/ISNA(MATCH(ROW(INDEX(C:C,100):INDEX(C:C,119)),C$1:C1,0)),RANDBETWEEN(1,20-COUNT(C$1:C1)))
 
Upvote 0

Forum statistics

Threads
1,215,509
Messages
6,125,216
Members
449,215
Latest member
texmansru47

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