Random Formula Excel

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

TRY NOW

Search 

Get instant live expert help with Excel or


Google Sheets
“My Excelchat expert helped me in less than 20 minutes, saving me what would have
been 5 hours of work!”

Post your problem and you’ll get expert help in seconds.

I need a formula to combine column C with the number mentioned in column L26 to L32...

TRY FOR FREE 

Our professional experts are available now. Your privacy is guaranteed.

All articles / RANDOM / How to Use the RANDBETWEEN Function with No Duplicates

How to Use the RANDBETWEEN 

Function with No Duplicates Did this article solve your problem? 

Excel allows us to create to generate random numbers list withoutItduplicates


did using the
RANDBETWEEN, RANK.EQ and COUNTIF functions. This step by step tutorial will assist all levels of
Onlyduplicates.
Excel users to learn how to use the RANDBETWEEN function with no partially

It did not

Send 
Figure 1. The final result of the formula

Syntax of the RANDBETWEEN Formula 


=RANDBETWEEN(bottom, top)
Did this article solve your problem? 

The parameters of the RANDBETWEEN function are:


It did

bottom – a value from which we want to get a random value


Only partially
top – a value to which we want to get a random value
It did not
Syntax of the RANK.EQ Formula
Send 
The generic formula for the RANK.EQ function is:

=RANK.EQ(number, ref, [order])

The parameters of the RANK.EQ function are:

number – a number for which we want to find the rank in the array
ref – the array where we want to rank the number
[order] – a type of ranking data in the ascending or the descending order (0 or omitted value).

Syntax of the COUNTIF Formula


The generic formula for the COUNTIF function is:

=COUNTIF(range, criteria)

The parameters of the COUNTIF function are:

range – the range from which we want to count the non-blank cells
criteria – the criteria for counting the cells in the range

Generate Random Number List With No


Duplicates in Excel
In column B, we will first generate random numbers from 10 and 30 using the RANDBETWEEN
function. As the function can generate duplicate numbers, in column C, we will generate a new list of
numbers without duplicates.

The formula in column B looks like:

=RANDBETWEEN(10, 30)

The bottom parameter of the function is 10, while the top parameter is 30.

To apply the RANDBETWEEN formula, we need to follow these steps:


Select cell B3 and click on it Did this article solve your problem? 
Insert the formula: =RANDBETWEEN(10,30)
Press enter It did
Drag the formula down to the other cells in the column by clicking and dragging the little “+”
icon at the bottom-right of the cell. Only partially

It did not

Send 
Figure 2. Using the RANDBETWEEN formula to get random numbers 10-30 list

Now we can use the combination of RANK.EQ and COUNTIF functions to create a list without
duplicates. 

The formula in the cell C3 looks like: Did this article solve your problem? 

It did
=9 + RANK.EQ(B3, $B$3:$B$23) + COUNTIF($B$3:B3, B3) - 1

At the beginning of the formula, we must add 9 to the result, as theOnly


range begins from 10. The
partially

parameter range in the COUNTIF function is the cell range $B$3:B3 while the criteria is the cell B3.
It did not
The number parameter of the RANK.EQ function is the cell B3, while the parameter ref is the range
$B$3:$B$23. An order is omitted because we want to rank in descending order.
Send 
To apply the formula, we need to follow these steps:

Select cell C3 and click on it


Insert the formula: =9+RANK.EQ(B3,$B$3:$B$23)+COUNTIF($B$3:B3,B3)-1
Press enter
Drag the formula down to the other cells in the column by clicking and dragging the little “+”
icon at the bottom-right of the cell.

Did this article solve your problem? 

It did

Figure 3. Generate a list of random numbers 10-30 Only


withpartially
no duplicates

It did notbecause only the


As we can see in Figure 3, column B has numbers 10-30 with duplicates,
RANDBETWEEN function is used. In column C, we have same numbers 10-30, but without duplicates
Send 
using the RANK.EQ and COUNTIF functions.
Most of the time, the problem you will need to solve will be more complex than a simple application
of a formula or function. If you want to save hours of research and frustration, try our live Excelchat
service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We
guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Solution examples

I need a formula to count the number of rows that contain at least one of two
possible phrases, but not give me the total number of instances that both phrases
occur overall.

Solved by E. B. in 33 mins

i have a table with Dates, First names , Last names and i want to count how many
times a name occurs, but if a name occurs more than once on a particular date i
need to only count it once. this is on excel and not google sheets


Solved by F. H. in 31 mins

Need a formula that counts (1,2,3,4 ect..in cell M21) a range of cells, N4:N20, which
are annual premium values. But I only want to add a sale count if the average
monthly premium is above $30 per sale. So if someone has 4 sales but they don't
equal a total of $120/mth ($30 x 4 = $120)... they would only get a count of 3 sales.

Solved by S. E. in 60 mins 

Did this article solve your problem? 

It did
Hello, I am trying to create a total color column? Can anyone help?
 Only partially

Solved by I. A. in 60 mins
It did not

Send 

A h h d 500 d f h h f 6
Any rep that has orders over 500 and occurrences at zero for each month, for a 6
month period. I need a sum

Solved by C. E. in 60 mins

Leave a Comment

Start the discussion...

Subscribe to Excelchat.co
Get updates on helpful Excel topics

Subscribe to Excelchat.co


Trusted by people who work at
Did this article solve your problem? 
United
Amazon.com, Facebook, Accenture Siemens The Allstate Dell
Macy's
It did Parcel
Inc Inc PLC AG Corporation Inc
Service
Only partially

It did not

Send 
Home About   

Excel Help Excelchat

Team Excel Tutorial

NL to SQL Experts

Excel Problems Platform

Contact SQL Tutorial

Labeling Press

© 2019 Got It, Inc. All rights reserved.

Did this article solve your problem? 

It did

Only partially

It did not

Send 

You might also like