I have to generate five distinct random numbers from 0 to 50 using only formulas and not VBA. How should I do it?
相关问题
- Excel sunburst chart: Some labels missing
- Unity - Get Random Color at Spawning
- Error handling only works once
- Excel formula in VBA code
- Excel VBA run time error 450 from referencing a ra
相关文章
- why 48 bit seed in util Random class?
- Get column data by Column name and sheet name
- programmatically excel cells to be auto fit width
- Unregister a XLL in Excel (VBA)
- Need help generating discrete random numbers from
- How to prevent excel from truncating numbers in a
- numeric up down control in vba
- Declare a Range relative to the Active Cell with V
Assuming A1 is blank or a text header you can use this "array formula" in A2
=SMALL(IF(COUNTIF(A$1:A1,ROW(INDIRECT("1:51"))-1)=0,ROW(INDIRECT("1:51"))-1),INT(RAND()*(51-ROWS(A$2:A2)+1)+1))
confirm with CTRL+SHIFT+ENTER so that curly braces like { and } appear around the formula in the formula bar, now copy to A6
That will generate 5 integers from 0 to 50 without repeats
You may want to round the following depending on your use.