Excel random number (based on another cell)

Posted on 2013-12-10
Last Modified: 2013-12-10

I need assistance with deriving a random number which range is determined by the value of another cell.

Usually, for a random number generation, I may chose the following formula:

... which, as you know, generates any number between 1 and 20.

Now, here's what I need to achieve instead.   Based on another cell value, derive a random number that is within a 30% range (up or down).   For example, let's say I have the following values in the below cell range:

Cell A1 = 10
Cell B1 = random number should be between 7 or 13 (30% of 10 = 3... thus, 10 - 3 or 10 + 3)

Cell A2 = 90
Cell B2 = random number should be between 63 and 117 (30% of 90 = 27... up or down)

Does anyone know how to generate the random number function for this concept?

Question by:ExpExchHelp
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 19

Expert Comment

ID: 39708440
The obvious answer is
=randbetween(B1*.3,B1*.7) assuming your target number is in B1

are you looking for something more complex?

LVL 43

Accepted Solution

Saqib Husain, Syed earned 500 total points
ID: 39708447
LVL 19

Expert Comment

ID: 39708449
oops, what he said

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.


Author Closing Comment

ID: 39708470
PERFECT!!!!   Thanks for the quick response!
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39708481
I really think that points should have been awarded to Reg as his solution came in first and is more simplified. I did not see his solution when I posted.
LVL 19

Expert Comment

ID: 39708497
Thanks Ssaqibh, but your solution was more accurate
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39708532
Ahh I see.

I had followed up with


but deleted that comment thinking that it was the same as yours.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question