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.
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.
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?
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, _
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.
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.
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.
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?
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.
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.
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
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.
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):
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(),
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)
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.
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.
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.
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.
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.
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).......................
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.
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.