Randomly Select One Of Two Cells To Populate From List?
Oct 16, 2013I am wanting to randomly select one of two cells and then populate that cell from a list I have on a different sheet.
View 1 RepliesI am wanting to randomly select one of two cells and then populate that cell from a list I have on a different sheet.
View 1 RepliesI have a list of people in column A and a list of Cities that they have visited in column B.
I need to check some of the cities they have visited monthly but don't want to check them all.
I have attached a sheet as an example (this has been scaled down).
The number of cities i want to check for each person varies each month depending on how many cities they have visited.
For example, John has visited 16 cities and i want to check 5 of them. I therefore want 5 random cities that he has visited to appear next to his name at the top. The real list of data is massive so this would be really useful if it is possible.
I have looked at rand but i can't get it to randomly give me more than one city, and i don't understand how to get it to give me say 5 cities one month and say 8 cities the next month purely based on a formula from another cell.
I have a sheet that has 13 players listed in rows down column A. I have 6 columns each representing a quarter in a game. I was wondering what the best way would be to randomly select 5 players in each column and to distribute each cell selection as equally as possible over the 6 quarters.
So what I am doing is having excel designate equal amounts of playing time for each player each game.
Is this possible.
Can I base this off of previous games?
I need to create a function that selects 4 names randomly from a list of 15 names and displays the 4 randomly selected names in the one cell. Also, you cannot repeat the same name in that cell, (i.e. bob cannot be selected twice in his group of four)
View 1 Replies View RelatedI've created a user form (click button on 'main page' to display). Combo Box called 'Last name' gets populated with all second names from the sheet 'Staff'
When a user selects a second name from the drop down list, I would like excel to automatically update the list box 'First Name'. Also, If a user changes the first name or Last Name, this should be saved
I have a validation list drop down box set up to reference data in a defined name list. I would like to be able to select multiple values from this list to appear in one cell (preferably separated by a comma). For example, the defined name list contains the following data:
Choice 1
Choice 2
Choice 3
Choice 4
I would like to be able to populate one cell with the following via the drop down list: Choice2, Choice 4
Is this possible and if so, how?
I have a workbook with sheet 1 called Support which is basically an input form. The second sheet is called Database.
I want to enter data into the form and via a macro copy the data to the database. I have followed a text book to the letter on how this is to be completed to the letter.
My problem is that when the data is written to the database some of the fields are blank. Using F8 I can step through the VB script which appears to select fields at random.
I'm trying to pull 20 random names from a list of them every time I open the spreadsheet, and have them copied onto the clipboard to be pasted wherever. I have some code I found to accomplish this, but I'm not exactly what you would call VBA savvy. Could anyone look at this and see what I'm doing wrong? Or if it is right what I'm doing wrong to get it to work?
Sub GetRandom()
Dim iRows As Integer
Dim iCols As Integer
Dim iBegRow As Integer
Dim iBegCol As Integer
Dim J As Integer
Dim sCells As String
Set TempDO = New DataObject
I have a column of DV lists. Is it possible for me to make excel, go through each DV list, and randomly select an item from each DV list?
View 1 Replies View RelatedThe macro below will randomly pick a cell (with names)and fill with color. What I want to add is after it pick a cell a msgbox with a name of that person with YES/NO, if YES fill color. I need it not duplicate once it has already selected that cell(person).
Code:
Function RandCell(Rg As Range) As Range
Set RandCell = Rg.Cells(Int(Rnd * Rg.Cells.Count) + 1)
End Function
[Code]....
I am trying to randomly select 10 data from a table by using index formula. But there are some blank cell in the table so It kept returning 0 in the cell.
problem.xlsx
by what means is it possible to unselect randomly selected areas, rows, columns from all sheets?
View 4 Replies View RelatedI have a table detailing products and product options showing the options possible for each product. Each row has an option class and value(in separate columns):Color Red,Color Orange,Color Blue,Style A Style B and so on. Each product is in column.
Valid options for a product are indicated with a 1, invalid options with a 0. See attached sample file.
For instance, if the product in question is Alpha, then available colors are red and blue.
For a given product I need to return a randomly generated valid option. As I want to be able to drop in additional products and options, I want to return a value without resorting to manually generating a column containing only the valid options. The real data set amounts to dozens of options types and hundreds of parts for which I want to generate test data.
I have a scheduling tool that I need to do the following with -
Allow user to select a range of cellsUser types a value (non formulaic just plain text)Value gets populated to all selected cells
The reason I'm not just using fill handles is because of the amount of formatting in the cells.
I want to randomly select letters from this distribution (to make random words) but I want the more frequent letters in the distribution to be selected more often so that the word I form have the same distribution. I have the feeling there is a simple solution to this but I couldn't see anything other than the frequency function that I thought I might be able to use. I could populate an array with letters present in numbers according to their frequency and then randomly select from it but is there a more elegant solution? .......
View 10 Replies View RelatedI have a drop down list with 6 recipes. When I select chocolate for example I want that to automatically populate different cells in the worksheet based on a standard I have created for that recipe. The recipes won't change they just have different ingredients and I want that to show up depending on what I select on the drop down list. I went into VBA and worked a little with this starting code:
If Target.Address = "$F$3" Then
Target.Offset(0, 1).Value = "1"
but It wouldn't populate separately based on what I had selected in the drop down it would just populate all 6 recipes the same.
I am looking to auto generate a roster/schedule. I have a spreadsheet with shifts for each weekday that I need to populate every week with names to pick from a drop down list. the drop down list is made using data validation and looks at a dynamic named range to allow me to select only the people who are available to work a certain shift.
Is there a way to do this using vba?
I want to be able to input wrestlers names and pair them up for 2 matches randomly. Is there any way to do this? I am not advanced in excel, but not a novice either. I need to make sure they don't wrestle the same people in each round. Also there will be wrestlers from the same team, so is there any way to try and not pair them together unless it is necessary?
View 2 Replies View Relatedcell a1 is blank
cell a2= "sb"
cell a3= "db"
cell a4 is blank
cell a5= "rm"
cell a6= "kw"
I want to randomly pick 1 set of initials from the 4 listed in the 6 cells and put the result in cell a7.
I have a list of potential competitors in an event, and am using both RAND and ROUND to sort them into a list of 1's and zeros. My formula is as follows: =ROUND(RAND()*1,0). My problem is that I get an uneven distribution of players, out of a list of forty, I may have 38 people that are 1's and 2 people that are 2's. I'd really like the list to be randomized, but evenly to allow for fair competition.
View 3 Replies View RelatedThe list is a crew list and I'd like to be able to select the foreman, but I'd like the crew cells to be populated with the information corresponding to that specific foreman. I've named the data range and created the drop down list but i cant figure out why the crew column wont populate with the crew. I am using a different sheet for my data.
I tried VBA but I am hoping I can use Index and Match.
=INDEX(crew, MATCH(C10, Personel!D2:F4, 0), COLUMN())
I am having a hard time searching for this formula.
Sheet1 has the following data in A1:A5
value1
value2
value3
value4
value5
I then have 5 additional sheets.
I want to populate cell D2 on each additional sheet with the values from Sheet1
Sheet2 - Value1 in "D2"
Sheet3 - Value2 in "d2"
and so on...
I am attempting to populate a row of several cells on a worksheet using a drop-down list, using data from a seperate worksheet in the same workbook. The worksheet containing the data will be hidden (I do not think that matters in this case). Do I place a VLOOKUP function in the first worksheet cells? see attached sample
DropDownSample.xls
As a follow-up question, as time goes by, the data in the source worksheet will be appended with new items (additional rows of data). As each new item is added, will I need to edit the formulas, or is there a way for Excel to dynamically add the new data? This might be stretching my wish list a bit but I thought I'd ask.
with this problem (which I've been trying for weeks to solve).
I have a column ("C") of 640 numbers, which I need to randomly sort and place into the adjoining (ten thousand) columns. I then need to correlate each of these 10k columns with column "B".
The problem I have with the attached (which works for small numbers), is that when I increase the table size to 640 rows and anything more than a dozen or so columns, it takes forever to calculate and Excel often crashes.
random ver 1.04 280214.xlsx
I am trying to create a schedule that will randomly populate with names from a list. I have learned how to do this with numbers. How can I do this with a list of names? How can I make sure that no names repeat?
In one column, I used =RAND()
In the cells where my numbers display, I used =INDEX(ROW($A$1:$A$24),RANK(Z17,$Z$1:$Z$24))
My wife is a teacher and she has asked me if there was a way of randomly selecting a child's name from a pre-defind list and for that child not to be selected again during that session.
Some criteria:
Up to 35 children in the class (selected from a pre-defind list)A child can only by picked on once during the lessonA method needs to be in place for seelcting the child's name (either a button that can be pressed, or another option).
I am trying to create a quiz for myself for studying a foreign language. and I am trying to create a command button, so that when clicked, it will randomly pick from a list of names (located in another sheet) and place the name in a desired cell.
View 9 Replies View RelatedHow do i make a drop down list in a cell show Select One in the cell when the cells previous contence (Option selected from drop down list) have been deleted. E.g Cell E5:E400 must show Select One in the cell and when clicked on show drop down list I dont want a input message box or error box i can do that with validation
View 1 Replies View RelatedI'll be collecting registrations on an Excel worksheet at a company event. Users will fill out a registration form, click a button, and the information is moved to a hidden sheet. That part works perfectly.
Periodically during the day, we'll give out door prizes, selecting winners from the list of registrants.
I need a macro that will look at the entries in column A in my hidden sheet and return one of them randomly.
I know there are random number generators, and I could make one of those work, but if I could just have it make a random selection from the populated cells in Col A, that would be slicker.
I have a sheet with a data in range A1:J9. I have a drop down list in each cell from A2:A100.
I'm trying to store all values in A1:J9 in an array using the property CurrentRegion.value like below
Code:
Arr=Range("A1").CurrentRegion.Value
The issue is that is taking as current region the range A1:J100, even if I don't have selected any value in the drop down list from A10:A100.
Is there a way to force CurrentRegion to select only values from A1:J9 ignoring the blanks dropdown list values or a similar way to load an array with values in a contiguous range?