How To Generate A Random Sample And Repeat It 1000 Times

Aug 14, 2013

im trying to create a simple random sample from my data set of size n=100 and then i need to repeat that step a 1000 times to make a new data set that i can transfer over to stata. Everything I have seen on the internet involves generating random numbers which isnt what i want. I need to be able to generate a random sample.

Currently my excel spreadsheet consists of 4 columns with 200 entries in each column.

View 4 Replies


ADVERTISEMENT

Generate Random Times In Excel Between Upper And Lower Limits?

Aug 23, 2013

I want to generate random times in excel between upper and lower limits , which i can do , but i also want dates in same cells with out randomization , means dates should act independently and time should randomize

it should be something like that

8/1/2013 05:55 AM
8/2/2013 07:55 AM
8/3/2013 04:44 AM

View 4 Replies View Related

Pull Random Sample

Oct 10, 2007

I want to pull a sample of 15 numbers from column A, the catch is that the contents of column B cannot match once the sample is pulled. How do I do this.

View 9 Replies View Related

Random Sample Out Rows Of Data From A Sheet

Oct 4, 2009

I've coded a macro that can randomly sample out rows of data from a sheet. This macro is used to sample out certain rows from a master sheet full of data (which has 48 columns) based on user names (a column titled LAST_UPDATE_NAME). For Example (ref. wkb attached), if for 5 users named Alastor, Catherine, Emma, Julie and Victor for whom i've to choose data from the Dump sheet.

I need to design a module in which if i input the no. of samples to be chosen against each name, then that many number of rows has to be chosen for that particular name and copied to a new sheet (probably such sheets can be renamed with the usernames). Also i want to consolidate the copied data from the multiple sheets and consolidate them to one sheet.

View 4 Replies View Related

Random Sample Of Size N From Dynamic List

Feb 13, 2014

I am working on a sampling tool in Excel which is based on what a user enters into a column. The user enters observation codes (text) in column A beginning at row 2 and going down to however many they have. I already have formulas which determine the sample size needed based on the number of nonblank values in that column; the resulting sample size is in G4. I'm thinking that I will need to have a form with a button module to select the random sample from the values in col A. This way Excel isn't running the module while the user is entering the values. The resulting sample can be pasted into a separate column or sheet.

View 3 Replies View Related

Pull Out The Sample Date And Time 20 Times

Dec 3, 2009

I have a file that samples performance on a cpu. The output shows the sampling date and time in column A. This column changes depending on how long I run the file. No matter how long the column, I only want to pull out the sample date and time 20 times. So if I had data in column A with 300 rows, I want to divide 300 by 20 and pull those 20 numbers and put them in column B in chronological order. Same thing if I had 4000 rows in column A, I only want 20 samples.

View 5 Replies View Related

Generate Random Numbers In Random Cells

Sep 18, 2009

I am working on a Random Cycle Count Generator that provides random SKU#s based on 3 separate columns of SKU listings. The user clicks a button to generate the SKU#s to cycle count for that day. What I would like to see is a date stamp in the columns next(B,D,F) to the referenced SKU listing(A,C,E) based on which SKU#s are generated. This will let me see the last date that the SKU was generated. I would also like it to automatically save after generating.

View 2 Replies View Related

Run A Loop For 1000 Times And Take Value - Copy / Paste In A Range

Sep 30, 2013

I have a rand () which provides me a different number upon calculate. I would like to run a loop for 1000 times and take the value and copy and paste in a range.

The below sorta works, but at times it stops or doesn't work at all. I have a loop for the counter and the for each to place the value into the cell and have it run over and over and placing the value in the next cell underneath. I have the counter at 10 so I dont get stuck in some endless loop before I know it works.

Code:

Sub montecarlos()
Dim MCs As Long
Dim c As Range
Dim lCount As Long
Dim lNum As Long
lCount = 0
lNum = 1
Worksheets("MonteCarlo").Activate

[code].....

View 6 Replies View Related

Generate Repeat Numbers When Compared To Previous Row?

Apr 16, 2012

How do I generate repeat numbers when compared to previous row?

E.g.

Column No A2, B1, C1, D1, E1
Row no... A1 5 12 23 50 3
Row no... A2 10 21 5 25 6

Repeat number for above is 5

Given:

1) 5 cells only. All numbers are integers, no fractions

2) In a row same number is not repeated.

3) It is possible to repeat all numbers in a new run.

View 9 Replies View Related

Repeat A Date 6 Times?

Jan 10, 2012

In cell A2 I have the date 28/12/11, I need that date to repeat 6 times, then in A8 it should say 01/03/11 6 times and so on , I know this can be done but my brain is on a go slow this afternoon and I can't for the life of me work it out

View 3 Replies View Related

Generate Random Numbers?

Aug 19, 2014

I am creating an excel spread sheet for a project I am doing, I need to create a daily chart for 6 months of water usage that results in averaging set targets.

I have made a chart with the average uses per day but would like to have daily numbers that average out to what i have but in a random sequence e.g. i have that a shower uses 320 litres per day for 2 people is there a way i can make a chart that says: 300 (a1) 340(a2) 260(a3) 360(a4) etc i need to do this for 180 days with random numbers generated to average the same overall. I dont know even how to generate random numbers.

View 4 Replies View Related

Generate Random Numbers Between 0-9

Feb 1, 2009

I am trying to generate random numbers between 0 - 9 in ten cells that do not repeat an always include every value 0 - 9 (0, 1, 2, 3, 4,...9). The object is to have the numbers randomize each time. So cells A1:A10 could look like this:

3
9
4
5
1
0
6
8
7
2

Or, they could look like this:

9
7
5
2
8
4.................

View 4 Replies View Related

How To Generate Random Text

Sep 26, 2009

I was just wondering if there is a way to make rand or randbetween functions work with text. Alternatively, is there another function that will allow me to do this, without adding numbers in the parallel row.

I want the column, to randomly choose between "male" and "female". I do not want to add additional rows or columns preferably..

View 14 Replies View Related

How To Generate Random Number Between 0.8 And 1.2

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

How To Generate 100 Random Numbers Between 100 And 300

May 14, 2014

generate 100 random numbers between 100 and 300 in some range of cells like A1:j10

View 1 Replies View Related

Generate Random Number

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

Generate A Random Integer

Oct 22, 2008

I want excel to generate a random integer between 132 and 321 and place it into cell B10. What formula would I need to enter into cel B10 to do this

View 9 Replies View Related

Generate Random Number Between

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

Generate Random ID & Increment Others

May 16, 2008

I'm using Excel to generate a userid based upon criteria (e.g. IF column A = 2, and not in array(another sheet), use a random id). This works, but I want an incremental id (whether already used up).

I am using =MAX(IF(LEFT(Users!B1:B19900)="2",Users!B1:B19900)) to get the highest number in the array ...

View 4 Replies View Related

Repeat Column Value Five Times Of Each Cell

Mar 23, 2014

I have values

2
8
9

As so on in my cells a1,a2,a3 as so on

And I want value of column a repeating five times of each cell value in column b

like result
2
2
2
2
2
8
8
8
8
8
9
9
9
9
9
and so on

View 3 Replies View Related

Repeat Macro Set Number Of Times?

May 11, 2012

I'm trying to repeat a macro a set number of times depending on the number a person inputs into cell B3.

Here it is currently:
Columns("C:D").Select
Range("C4").Activate
Selection.Copy
Columns("E:E").Select
Range("E4").Activate
Selection.Insert Shift:=xlToRight
Range("C3:D3").Select

View 4 Replies View Related

Generate Random Numbers To Specific Value

Aug 24, 2014

Any way/method to make a certain number of cells randomly generate to a specific value you want? I only want to use the number from 1 to 60.

example:

1 37
2 29
3 34
4 2
5 58
6 38
7 =198

View 9 Replies View Related

Generate Unique Random Numbers

Oct 7, 2005

I want to generate numbers (1 to 15) in cells A1 through O1, but the
number in each cells should be unique compare to the other cells, how
can I do it? If I use =randbetween(1,15), I can not get unique number
in each cell, some numbers are duplicated.

View 11 Replies View Related

How To Use RAND To Generate Random Numbers Between 0.25 And 0.5

May 23, 2013

How do I use RAND to generate random numbers between 0.25 & 0.5?

View 9 Replies View Related

Generate A Dataset (random Numbers, Mean, Etc)

Mar 17, 2008

I'm trying to generate a dataset to use as an example in a class I'm helping out with.
I want 75 cases (that is, 75 rows)

Column A
randomly pick 1 or 2

Column B
60% 1 and 40% 2 randomly assigned to cases 1-75 (Thus, 45 1's and 30 2's randomly assigned to rows 1-75)

Column C
Randomly pick from the range of numbers 18-65. Make sure the mean for the column is 48.72.

Column D
Randomly pick from the range of numbers 1-7. Make sure the mean for the column is 5.49.

View 9 Replies View Related

To Generate Some Random Problems. But The 1milion

Dec 15, 2008

name="ProgId" content="Word.Document">****** name="Generator" content="Microsoft Word 12">****** name="Originator" content="Microsoft Word 12"> Generate random problems
In addition to data from af directory i got it must be possible to solve some home-made problems. Therefore i need to make a program that can generate new problems in Excel - likely on the same sheet used for the imported problems (another code i got).

It should be possible to specify the size of the problem, in other words the number of cities. Like the problems from the same directory. The problems i am generating have to consist of a number of cities with its x-y-coordinates. It will be useful if the program or the user sets a minimum and maximum value of the allowed x-y values so they are within a certain interval.

Do i need a very big code for this?

View 9 Replies View Related

Generate A Random 9 Digit Number

Jan 7, 2009

I have a spreadsheet with approx 11,000 rows and I would like to generate a unique 9 digit number for each line.

I know I could just put 100 000 000 and then increase that by one all the way down but I was wondering if there was any formula or code

View 9 Replies View Related

Generate X Random Numbers Adding Up To 1

Feb 24, 2008

I've got a problem with creating random numbers for a fictional portfolio. I've to have a row of random number but they have to add up to 1. Example: Need random numbers from B1-B11

under constraint: Sum(B1-B11) = 1

I tried to do it with the solver addin, but it only takes simple numbers as a constraint.

View 4 Replies View Related

Repeat List Of Names X Number Of Times?

Jan 10, 2014

I'd like to be able to repeat a list of names X number of times.

Example: Repeat count = 3

Name1
Name2
Name3
Name4

becomes

Name1
Name2
Name3
Name4
Name1
Name2
Name3
Name4
Name1
Name2
Name3
Name4

View 4 Replies View Related

Macro To Repeat Row Specific Number Of Times?

Apr 19, 2014

I have never built or used a macro before and need very clear step by step instructions. I am just assuming that a macro is the answer to what I am looking for but if there is a simplier solution that would be fantastic.

I need to be able to repeat a row of data a specified amount of times.

Example:

3 Yellow James
2 Green Mark
5 Purple Sue
1 Orange David

Needs to look like:

3 Yellow James
3 Yellow James
3 Yellow James
2 Green Mark
2 Green Mark
5 Purple Sue
5 Purple Sue
5 Purple Sue
5 Purple Sue
5 Purple Sue
1 Orange David

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved