Random Data Selection
Jan 13, 2009
I have data for number of firms as :
year firm
1 1
2 1
3 1
1 2
2 2
3 2
1 3
2 3
3 3
.............
.............
1 1000
2 1000
3 1000
how can one chose random samlpe from this population.
View 3 Replies
ADVERTISEMENT
Feb 5, 2009
I am wondering, in excel 2003 is it possible to randomly select two numbers from one column, say column b9:b45, that are random numbers, and selected by two different font colors. In other words: b9=1348, b10=1349, b11=1350, b12=1351, b13=1352, b14=1353.
Say we press a macro button, and in field B50 one radom black colored number is selected of a field of say 30 numbers that are all black in that column, and in b51, one red number is selected, in a field of 30 red numbers. We want to used this macro to select winners simulating a raffle drawing.
View 4 Replies
View Related
Jun 28, 2009
I have a file (see SAMPLE file attached) with over 2000 records. I need to know if there is a way to do a sampling or random selection by ethnicity and gender in order to get a diverse population for only 60 individuals. The selection criteria should be on ethinicity and gender.
Is this possible?
View 10 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
Feb 8, 2009
I'm trying to select an x number of random selections within the selection.
Basically, lets say A1:A100 is selected, im going to have a inputbox asking how many to select, you put 10 in the inputbox, and then it randomly chooses 10 from A1:A100 and highlights them
This seems easy enough, i can do the input box and know the random function. just not sure how to set the beginning point and the ending point with Cell locations and then have it highlight those selections... a for loop I'm guessing?
View 9 Replies
View Related
May 15, 2013
I have been able to put together the below which generates a random 15% sample of all records in the worksheet.
It works perfectly, however what I would ideally like to do is get it to only produce the 15% sample of rows where it is todays date in col B and has the word "other" in col C. I've tried lots of different IF statements and FOR statements, but am only generating blank worksheets.
Sub getrandomrows()
Dim lr As Long, lc As Integer, a As Variant, MyDate As Date
lr = Cells.Find("*", LookIn:=xlValues, after:=[a1], searchorder:=xlByRows, _
[Code].....
View 6 Replies
View Related
Aug 29, 2008
I have a set of 20 numbers that I regularly wish to select 6 numbers from, without duplicates
View 9 Replies
View Related
Jan 10, 2007
Create a random selection based on odds. It would be similar to the RANDBETWEEN function, but in this case I specifically want one of the three values to be selected randomly in cell C2 based on the odds given.
View 9 Replies
View Related
Jun 24, 2008
I am working on a challenging project. I have a list of names, job titles, and departments. Is it possible to select a random name who matches a specified job title or department? I'd prefer not to sort/filter/delete the original data range because the sheet will be used multiple times during the day by multiple users and with different criteria each time.
View 6 Replies
View Related
Apr 21, 2014
organising a golf tour for 32 players.playing in teams of 4 (4 Balls) for 4 games of golf and the teams are to be randomly selected such that no player plays in a group with a person he has played with in a previous game. finding it difficult to create a spreadsheet which meets this criteria.
need to build into the spreadsheet the fact that the variable mix of people is constrained by the fact that at least 4 persons have to use a buggy (which will have 2 people in it) and as the tour progresses and courses become physically demanding a number of people (N) for the last 2 rounds may also ask for the use of buggies as well.develop a spreadsheet to make the 4 Ball team selections.
View 2 Replies
View Related
Sep 3, 2009
I want to do is randomly pull from a field of data, MINUS any cells that do not meet the criteria in other columns. So if column A is my target column for the random selection (containing 10 unique entries), and column B has 10 repeating colors, and column C has 10 repeating animals, what can I use to perhaps create this effect: A random pull from column A, but only from rows in which column B says red and column C says cat? (The pull being 1, 4, 7, or 9 in the below example, of course.)
Data (this example is also attached in an excel doc):
One Red Cat
Two White Dog
Three Blue Horse
Four Red Cat
Five White Cat
Six Blue Cat
Seven Red Cat
Eight Red Dog
Nine Red Cat
Ten Red Horse
I have tried variations on IF and INDEX to no avail. Perhaps something with SUMPRODUCT?
View 3 Replies
View Related
Jul 23, 2009
I need an action to allow for the random selection of a predetermined series of number codes which represent a given letter.
It is probably easier to look at the attached sheet and the previous discussion to see what I mean.
Previous discussion:
http://www.excelforum.com/excel-work...-of-cells.html
View 2 Replies
View Related
Apr 24, 2009
I have a list similar to the below:
#....|Name.... | Weighting %
1Artur Boruc 1
2Igor Tudor 5
3Alessandro Grandoni 3
4Gian Elia Amoretti 3
5Olivier Kapo 12
6Kim Källström 13
7Emiliano Bigica 13
8Julio Baldivieso 12
9Fabrizio Miccoli 13
10Peter Vougt 14
11Massimiliano Esposito 12
What I want to do is randomly select either number 1 to 11 (leftmost column OR the person it represents) but also make the selection based on the percentages in the rightmost column. To illustrate using the above example, Number 11 (Massimiliano Esposito) should have 12 times more chance of being randomly selected than Number 1 (Artur Boruc)...
I have used a formula such as
PHP
=INDEX(A$1:A$11,INT((RAND()*11)+1),1)
to randomly select a cell but how would I modify this to include cell weightings? Or is there a better formula?
An additional note I have is that the weighting for each person will always be changing, but will always be a percentage.
View 11 Replies
View Related
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
Nov 28, 2012
I have a set of data spanning across 400 rows and I want to somehow be able to have a macro to randomnly select say 40 rows of data and highlight it..
View 5 Replies
View Related
Aug 28, 2013
I have range of data where i want to randomly select a value in that range but what i want is to visually see it activating random cells and then finally select 1 at the end. Its just more of a nice visual effect and then select a value/cell.
This code just goes through all the cells but not exactly what i want to do.
Code:
Sub test()
Dim ws As Worksheet
Dim cell As Range
Set ws = Sheets("Sheet1")
For Each cell In ws.Range("Data")
cell.Activate
Next cell
End Sub
View 5 Replies
View Related
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
Jan 25, 2012
I was trying to figure how to write a formula that would return the contents of a cell in a table.
Here is the situation....
I have a 10 row by 10 column "grid". the top and left side of the grid contains a random number from 0 to 9. The numbers do not repeat.
It would remind you of a block pool.
If I have two numbers, 0 to 9 , is there a way to return the cell that corresponds to the intersection of those numbers in my table?
It would be both a Vlookup and an Hlookup which I can't do.
View 4 Replies
View Related
Jan 15, 2010
I have random comments in a column of cells of which I'm searching for a specific string of characters that may be contained in each cell. I want to pull 2 pieces of data from this specific string and place the data in 2 other cells in the same row.
Sample comments in cell 'N1':
..... blah, Appt: Friday; 12/4; night drop off. blah, blah....
Sample comments in cell 'N2' (and so on and so on):
.....blah, blah, Appt: Thurs; 12/3; 12:30PM. blah, ....
The specific string in the above examples will always begin with:
APPT:
Then the key elements found directly after the 'APPT:' are:
Thurs; 12/3; 12:30PM.
(which are the)
DAY; DATE; TIME.
These elements will be always separated by the semi-colon ';' and the string will always end with the period '.'
I need a pair of formulas to be in col 'J' & 'K' to extract the DATE and place it in column 'J' and the TIME and place in column 'K', both in each same rows.
So, from the 2 above samples I would need the following:
in Cells:
J1 - 12/4 ....... K1 - night drop off
J2 - 12/3 ....... K2 - 12:30PM
I've been trying to come up with a formula using a combination of FIND() & MID(),
View 9 Replies
View Related
Aug 11, 2014
Im looking to create random data for an athlete over about 4 months with daily tests, however when im using the =randbetween(*,*) function the data is too 'Random'. so im looking to create a trend in the data, like real athletes will have. is there a function in Excel 2010 that can do this?
The boundaries of the data are -336,416 (i know its quite a big range)
View 8 Replies
View Related
Jan 16, 2014
I am facing a issue with arranging a data in excel as weekly reports by getting a random input in the form as mentioned in the attachment
Needed like below
Name 1-Jan 2-Jan 3-Jan 4- Jan...........
Ram 0 L 0
Ravi 0 0 0
rohan 0 0 0
sheel 0 0 0
Inputs are like below format
name 2-Jan 8-Jan
Ram L 0
Ravi 0 0
rohan 0 L
sheel 0 L
Attached File : formal needed.xlsx‎
View 2 Replies
View Related
Apr 24, 2014
I am trying to build an excel spreadsheet for a hockey program I'm coaching that will do the following:
Create 4 teamsThere will be a Team 1 White/Dark, and Team 2 White/DarkUse 2 lists to distribute players evenlyThere are a disproportionate amount of players on each list. There are 8 Majors, 12 Minors. 2 Majors maximum need to be on every team.Every week, the roster will be different (some don't show). I need to be able to hit 'randomize' and exclude certain people, and still have the lines 'relatively' similar This is an essence two 3 vs 3 games, with a white vs. dark on each side of the ice (2 half-ice games). If there are 3 majors on each side (6 in attendance), one side will have a white with 2 majors, the other side will have a dark with 2 majors.
I'd also like a way to keep track of who's played with/against who, so if I can export that data set to ensure I don't get a duplicate team...or a primarily duplicate team.
View 4 Replies
View Related
Dec 20, 2012
I would like to know how I can get excel to randomly select one line of data for each of the people listed below (so one for bob, one for jenny, one for Trish etc.). I have been trying a mixture of vlookup and rand but to no avail, below is just a sample list but I would like to try it on a large set of data. I have been able to get a random transaction but not one for each person.
Code:
a1
b
c
d
e
f
g
h
i
j
2
3
4
REF_ID
NAME
DATE
BILL TOTAL
[Code] .....
View 1 Replies
View Related
May 28, 2014
I want to load the actual data exist in the rows by selection value from the data validation list.
E.g I have two worksheet in one excel file. One has a data activities of persons with their name like two columns i have in which one exist the name of person and second exist the activities which they perform.
On the second sheet, i made a data validation list of all the person names
Now my requirement is, when i select a person name from the list, load all the data from the 1st sheet to second sheet. Is this possible without VB code, because I want to share it on the Google sheet with my boss, where VB sheet is not supposed to work.
View 13 Replies
View Related
Jan 5, 2009
i have data on firms for six years as the following :
1
1
1
1
1
1
2
2
2
2
2
2
3
3
3
3
3
3
how can i select the data for first year for each firm.
View 5 Replies
View Related
Nov 24, 2011
i have a problem in that i need to generate a random 6 digit number preceeded by an X if the data in column B is either blank or 0. This needs to be filled in if the adjacent cell in column C has data in. i am a moderate macro writer and am finding this part quite challenging.
i am ussing excel 2007.
View 3 Replies
View Related
Jun 3, 2013
If a user selects certain options from a drop down list created by cell verification (from list), is it possible to display an input box and have the resulting input populate on another worksheet in the workbook? I have an attendance template I'm working with and if a user selects OT (Over Time) then a input box is displayed prompting for how many hours. The overtime is then tracked on another worksheet.
View 1 Replies
View Related
Oct 3, 2006
I tried very hard to design a leave roster for user to mark their leave application. The criteria are as follows:
1. 4 applications per date
2. a region of worksheet (i.e. "A2 to H20) will be defined for users to "click" on the cells (within the defined region) to mark their application.
3. once a cell is clicked (i.e. marked), it cannot be altered.
4. each click will automatically increase the total by 1.
I got the following code to deal with the situation but user can still click on any cell outside the region (in fact I fail to define the region).
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim m
ad = Mid(ActiveCell.Address, 2, 1)
m = Range(ad & 24).Value 'here a formula "CountA(A2,A20)" will be place in the cell (24, c).......................
View 2 Replies
View Related
Jan 30, 2007
I have attached a portion of an excel file I am using at the moment. What I require is a piece of VBA code which will allow me to copy selected data based on a combo box selection. What needs to happen is this :-
If the selection in the "Index" worksheet combo box related to "Month" in cell G19 is for instance "December", I would like the macro to compare this cell value to the cell values in cells C96, C124, C152, C180, C209, C236, C263 and C290 in the "Tech Services" worksheet and where the values match.......copy the commentary (Range C126:Z147 in December's case) to the range C34:Z55.
View 9 Replies
View Related
Oct 14, 2008
I'm trying to create a new spreadsheet to keep a record of orders recieved.
the example attached. What I would like to do is:-
Enter data in the Order Sheet (Sheet 1) under Column C, from a drop down menu taken from Data Sheet (Sheet 2) Column B. I then want Excel to filter the items available from Sheet 2 that correspond to the colour chosen, and once that has been done, I want the part number to be automatically entered.
For example, I order a Red pen, I type/select Red in C2 in D2, I then want Excel to only show the items related to the Red pen Fine nib rd123, Medium nib rd234, Thick nib rd345.
View 2 Replies
View Related