Producing Random Number, Then Another With No Common Factors
Aug 5, 2009
This is kind of an extension to a previously solved post. For a similar problem I used the attatched file (which someone from here so kindly came up with - but to be honest i dont fully understand),
but now im getting onto numbers from 1 to 100 so could get very confusing in the table!
RANDOM TABLE2.xlsx
Basically I want to produced a random number, (which I have managed) then another number, but it cant have any common factors as the first.
So 1st = 10, 2nd = 13 is acceptable
but 1st = 22, 2nd = 12 is not.
I have managed to do it with smaller values by just typing then out, but this is a very long winded technique, but is there a formula that can do this?
View 8 Replies
ADVERTISEMENT
Nov 27, 2013
I have a set of data with index numbers and the percentage of their occurrence. I want to use this percentage to weight the occurrence of the index numbers and create a random list of say 500 occurrences.
Index %
1 7.95
2 3.28
3 7.37
4 38.45
5 28.62
6 14.12
View 8 Replies
View Related
Jan 20, 2009
I have a spreadsheet with early retirement factors;
Years early
1 93.5%
2 87.6%
3 82.3%
4 77.4%
What I'd like to know is if there is an easy way to work out the factors for 1 yrs 1 mth early, 1 yrs 2 mths early, 1 yrs 3 mths early, etc.
View 2 Replies
View Related
Jan 29, 2010
Searching through the forums, I've found a post of daddylonglegs, witch shows how to find the smallest factor of a number:
View 7 Replies
View Related
Nov 4, 2009
I have a spreadsheet where I want to record the VO2max value (a number indicating the maximum volume of oxygen a person can utilise) of a person.
The VO2max is just a number, normally between 30-60.
I then need excel to look up the VO2max value (i.e. “35”) and give that number a predetermined inputted value name in a different cell (i.e. “low” or “fair”, “good”, “very good” etc etc).
However, as VO2max is also affected by age and *** I also have a column for the participants age and *** and I want excel to use that to make the value name.
E.g. in a 24 year old male a VO2max of 32 is “low”
But, in a 42 year old female a VO2max of 32 would need to be classed “”moderate”
Any ideas how this can be done? can it be done?
I could post the table containing the age range, values and names if I knew how to post an excel sheet on here.
View 9 Replies
View Related
May 20, 2009
I'm trying to make a table of the total amount of a liquid used throughout the day. Here is what I am trying to do: In cell D4, I want to be able to enter something similar to the following: 3cup+2bottle+1liter
and by doing so, Excel can automatically recognize that 1cup is 8oz, 1bottle is 17oz, and 1liter is 34 oz because of the reference chart provided on the side. Also, it would be able to notice the 3, 2, and 1 amounts so it would multiply accordingly so it would know to do this: (3*8)+(2*17)+(1*34)
and then put the calculated amount in the cell. The correct answer should be 92oz. Is there a way for Excel to recognize the conversions (i.e. whenever it sees 'cup' it will multiply by 8) and multiplication factors (i.e. 3, 2, 1)?Is there a formula I can enter that I can just "drag" down to the upcoming days in column D?
I know I can just do something like this: (3*G4)+(2*G5)+(1*G6).
View 2 Replies
View Related
Jul 25, 2014
I have 2 tables (see attached short sample) and need to merge them. Both tables containing 1 common ID for location (S220) and one common number. I need to fill out Table A (column A-B) with corresponding numbers from Table B (from column E-J). The desired outcome showed in Table C (column O-P).
View 5 Replies
View Related
Dec 10, 2006
How do I make a row of 5 random numbers in A2:A6 that are not the same as each other. It's basically for a Bingo card. I have a formula that can calculate the random numbers =INT(RAND()*15)+1 under the B's for example, but I can't seem to figure out how to make it so they are not the same.
View 14 Replies
View Related
Oct 13, 2009
How can I make sure that I can generate random numbers that don't repeat using the rnd function in VBA.
View 14 Replies
View Related
Jan 3, 2014
I have build a system that needs a lot of random numbers generated to work.
I have used what I thought would work to generate me these numbers like this example:
VB:
Lastrow = ThisWorkbook.Sheets("RPlay").Range("A" & Rows.Count).End(xlUp).Row
RPlayerNum = Int((Lastrow - 2 + 1) * Rnd + 2)
This would generate a random number into RPlayerNum variable, based on the list in sheet RPlay, missing off row 1 as the header.
However we have noticed a massive flaw in this code.... It works as long as the excel file is open, each time run it gives a different random number. However if you close the excel file and open it, then run it, it ALWAYS gives the same number first run, every time.
View 3 Replies
View Related
May 18, 2014
How to generate random 50 number with 10 group..
View 6 Replies
View Related
Jan 3, 2014
Is it possible to use the =randbetween() function to generate a random number between 0.8 and 1.2.
View 4 Replies
View Related
Sep 21, 2009
If I generate a random number in cell A1 ranging from 1 to 3. Can I count how many times the result is equal to 2 if I was to run it 100 times and then show the results in cell A3.
View 9 Replies
View Related
May 5, 2009
I have a formula to generate a random number between 0 and 10.
View 10 Replies
View Related
Feb 5, 2007
I need a macro that will select a random number between 1 and 6. ie select the number of a dice. It needs to input 1 random value into one cell and another random value into another. Like the dice values of a monopoly game.
View 9 Replies
View Related
Oct 11, 2007
is if there is a way to generate random numbers between 0001 and 9999. I always need to always have 4 digits. The first couple of numbers can be 0 so that I can maximize the number of variations.
View 9 Replies
View Related
Apr 19, 2006
random number selection...
i have a list of 200 items (rows) and i would like to "randomly" select 30 of them...(next month i will get another 200...)
View 3 Replies
View Related
May 4, 2006
I get the following error whenever I try running a Monte Carlo simulation with iterations in excess of 64000 (The MC simulation calls the 'NormSInv' worksheet function at least once per iteration, and the argument to the 'NormSInv' function is always a standard normal RANDOM number also generated by Excel VBA): Run-time error '1004': Unable to get the NormSInv property of the WorksheetFunction class
Why do I inevitably encounter this error ONLY when the number of iterations exceeds 64000, for instance? Simulations with iterations < 64000 run smoothly without a glitch.
View 2 Replies
View Related
Jun 2, 2006
I am using the data analysis add-in to generate a random number (using the random number generation) using a normal distribution. The problem is, i want it to recalculate these numbers every time the worksheet is recalculated but the numbers seem to be values only.
View 2 Replies
View Related
Nov 28, 2006
i have worked in access using vba procedures. i can easily create a form in access that generates a random integer number between 0 and 20 and the user will guess the number between 1 to 20 if the random number is 16 and the user enters 14 the program will display a msg box saying too low or too high. here is the code .
Option Explicit
Private Const MAX = 20
Private Const MIN = 1
Private iKey As Integer
Private lTries As Long
Private Function Random() As Integer
Random = CInt(Int((MAX - MIN + 1) * Rnd() + MIN))
End Function
Private Sub cmdGuess_Click()
Dim lGuess As Long
now i have to do the same thing in excel create a program that will ask the user to enter numbers between 0 to 20 and see if the random number and user guess is same or not. but i have never worked in excel using vba procedures how can i achieve the same thing in excel using a vba procedures.
View 3 Replies
View Related
Dec 20, 2006
I have a random number generater but it creates a new random number whenever I recalculate the sheet or enter something in another cell. I would like it to choose a random number once and not do it again until a condition, specificaly a date, is met.
View 6 Replies
View Related
Aug 29, 2007
how to put time delay on my program?
like it will generate again every 9 minute?
Private Sub CommandButton1_Click()
Dim x As String, i As Byte
Randomize
x = Format$(Int(Rnd * 1899) + 1, "0000")
For i = 1 To Len(x)
Me.Controls("TextBox" & i).Value = Mid$(x, i, 1)
Next
End Sub
View 4 Replies
View Related
Jun 24, 2014
is there any rule for random number to be picked up? Any Rule, Any Formulae, Any Calculation Anything, Any authentic routine which may guess what would be the next random number? for example if first random number is 825587 then what would be the next?
View 4 Replies
View Related
Jan 5, 2014
I have the following formulae to pick up a random number from 0 to 9999.
=TEXT(RANDBETWEEN(0,9999),"0000")
I want to start this random search from a specified number. for example if i press F9 it should show 3456 at first press and then onward.
View 1 Replies
View Related
Jul 29, 2009
I understand how RAND and RANDBETWEEN work, but have a slightly more complicated random number generation problem that requires a number that isn't solely between two numbers.
I have one cell that is randomly generating a number between 0 and 350 (we'll call this value A) and another randomly generating a number between 0 and 15 (value B). Then, I have a third cell (value C) that equals 15 minus B. Where I am having trouble is with a fourth cell (value D). This cell I want to have randomly generate a number between 0 and 350 but it needs to be D less than the value in A or C more than the value in A. Is there an advanced random number generation technique that can solve this?
View 12 Replies
View Related
Oct 20, 2009
I have a spreadsheet of 1000+ companies and I want to take a random sampling of 100 of them. I would assume this could be accomplished by auto-filling a numerical value to each line of data (which I did), then scrambling only the column with the numbers (which I can't figure out), and then selecting the entire text and resorting it to put the numbers back in order and then just work with the first 100 rows (which I can do, if I knew how to make the numbers random).
View 10 Replies
View Related
Mar 12, 2014
I have taken on a project that is would seem is far out of my league right now, but need to deliver.
I have attached the example spreadsheet what I am trying to achieve, which is basically a random automated number allocator.
Look forward to receiving your replies,
Example.xlsx
View 4 Replies
View Related
Oct 23, 2009
Say I have a list of 100 numbers (in column A). What formula would I use to have Excel list (in column B) 50 random numbers from the list of 100 or column A?
View 6 Replies
View Related
Apr 2, 2007
i have the formula =CHAR(INT(RAND()*25)+65) which creates random number when dragged from say C1 TO C6 however i need the 3rd 4th or 5th character to be a random number between one and 9 is this possible?
View 9 Replies
View Related
May 12, 2007
I have a range of cells that have values from 1 to 7 in them. What I would like to do is to have the next column generate a random number from 1 to 7 that does not generate the number that the cell next to it has. for example if cell A1 has 6 in it, I would like cell b1 to generate a random number other than 6 in it. if cell A2 has 3 in it then cell B2 would generate a number other that 3 (1,2,4,5,6, and 7).
View 9 Replies
View Related