Adjusting Values Returned by the RAND Function

In this chapter, you’ll learn about how to adjust values returned by RAND function. RAND function provide us the random numbers and it gets changed every time by doing any activity in the worksheet.

 

Let’s take an example and understand:

We want to retrieve two random numbers between 0 and 30, ensuring that the first number is always greater than the second one.

To solve this problem we will use INT function along with RAND function. You’ll learn two ways to use the combination of these formulas.

Follow below given steps and formulas:-

  • Enter the formula in cell A1
  • =INT(RAND()*30)+1

image 1

 

  • Copy the same formula in cell A2

image 2

 

Let’s try another formula:-

  • Enter the formula in cell A3
  • =INT(RAND()*A2)

image 3

 

By using functions this way you can get desired result in the cell. And, you can save lots of time.

 

image 48

 

If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook.

We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write us at info@exceltip.com

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.