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


ADVERTISEMENT

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

Average Formula When Sample Size Changes

Jan 17, 2008

I am computing the average of anywhere from 5-10 numbers. When the numbers are not inserted there is nothing left in the cell. The problem is I get a value that is close to the average but not the real average. (Also the cells I am using are N37:Q41 for the first 5 samples which is constant the next 5 are not always constant W37:Z41) Here is the formula I am using:

=IF((W37="")+(W38="")+(W39="")+(W40="")+(W41=""),AVERAGE(N37:Q41),IF((W38="")+(W39="")+(W40="")+(W41=""),AVERAGE(N37:Q41,W37),IF((W39="")+(W40="")+(W41=""),AVERAGE(N37:Q41,W37:Z38),IF((W40="")+(W41=""),AVERAGE(N37:Q41,W37:Z39),IF(W41="",AVERAGE(N37:Q41,W37:Z40),AVERAGE(N37:Q41,W37:Z41))))))

I have the same problem with a standard deviation formula and the same group of numbers (I get something close but a few points off).

=IF((W37="")+(W38="")+(W39="")+(W40="")+(W41=""),STDEV(N37:Q41),IF((W38="")+(W39="")+(W40="")+(W41=""),STDEV(N37:Q41,W37),IF((W39="")+(W40="")+(W41=""),STDEV(N37:Q41,W37:Z38),IF((W40="")+(W41=""),STDEV(N37:Q41,W37:Z39),IF(W41="",STDEV(N37:Q41,W37:Z40),STDEV(N37:Q41,W37:Z41))))))

View 9 Replies View Related

Calculate A Sample Size Using The Population

Apr 16, 2009

How you do use excel to calculate a sample size using the population, error limit, confidence level and upper error limit rates?

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

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 View Related

List Box- Sheet With The Following Sample Data On It

Dec 5, 2009

I have an excel sheet with the following sample data on it.

Name Age Sex Height
Ray 33 M 5' 8''
Sind 29 F 5'4''
Ralph 3 M 2' 1"
Ryan 1 M 1' 2"

I have managed to extract this info onto a form named Form1 which has 4 list boxes in which the above info is displayed in the same format.

To be more precise

Listbox1 shows all the Names,
Listbox2 shows Age
List box3 shows Sex and
Listbox4 shows height respectively.

What i want to do is, When i select an item on Listbox1, all corresponding enteries on Listbox2, 3 and 4 should also be simultaneously highlighted,

For example if I select the third data Ralph on the ListBox1, then ListBox2 should highlight 3,
Listbox3 should highlight M and
Listbox4 should highlight 2' 1" simultaneously.

View 9 Replies View Related

How To Filter A Table Of Dynamic Size

Oct 15, 2012

I am trying to filter a table of dynamic size. My table begins at P3 (first row of data, not column header) and ends somewhere at the bottom of Column AA. I am getting an error "AutoFilter Method of Range Class Failed." Why? How do I fix this?

Here is my code

VB:

If Target.Range.Address = "$B$4" Then
With Sheets("Days Past Due")
LastCell = .Cells(.Rows.Count, "AA").End(xlUp).Row
MsgBox LastCell
ActiveSheet.Range("P3:AA" & LastCell).AutoFilter Field:=17, Criteria1:="MABST"
End With
End If

View 3 Replies View Related

Sorting Data With Dynamic Size Using VBA

Jun 8, 2014

I currently have two tables in one worksheet showing the sales of different region.

The problem is, when I sort the data (I can't used the named ranges as it should exclude the first row which is the header), is there a way I can make it dynamic too??

** The Europe table is from A1:G5 where Row 1 is the Header and Row 5 is the Total

Code:
With ThisWorkbook.Worksheets("Sheet1").Sort

.SortFields.Clear
.SortFields.Add Key:= _
Range("G2:G4"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption _
:=xlSortNormal
.SortFields.Add Key:= _
Range("F2:F4"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption _

[Code] ........

View 3 Replies View Related

Randomize & Size Dynamic Array

May 16, 2008

I play in a rock band and i'm trying to create a randomly generated set list based on categories.

Rock, Blues, Slow, & Original are the categories

My sheet of songs is sorted perfectly by these categories already and I have dynamic ranges already named to their respective categories.

the module i am using to randomize these categories does not dynamically expand....

View 8 Replies View Related

Auto Size Dynamic Changing Chart

Jun 14, 2008

I have created a dynamic chart in excel where either the number of Series or the number of Data Points will change dependent on user inputs in the model. I've done this using the Offset Function in a Defined Name in Excel and dropped this Defined Name into vba code using ActiveChart.SetSourceData.

Anyway, all works fine, pulling the correct data, etc. What doesn't work is the final appearence of the chart. The chart has a Legend placed at the bottom of the chart, as standard, unless there is only one Series, when I remove the legend altogether. Whilst the legend works fine, the Plot Area of the chart doesn't update automatically to accomodate the changing size / existence of the Legend. Does anybody know how to do this? I tried using hieght, etc properties, but I don't know how to make them variable

View 4 Replies View Related

Dynamic Histogram That Adjusts Bin Size Based On User Input

Jul 2, 2014

I'm trying to come up with a histogram chart that adjusts Bin Size based on user input. I've come up with the formulas for Bins and Frequency, but am struggling when it comes to charting the data to dynamically update when the user changes Bin Size. How to make the x-axis dynamically adjust with the number of Bins.

View 5 Replies View Related

Relating List Of Random Numbers To A List Of Names To Create Rota

Nov 21, 2013

I'm trying to create a staff rota which will populate a rota randomly when prompted - I have been trying to find some way of connecting the random lists and the staff names, though this has proved difficult (to say the least!). How best to proceed? I'm also fully aware of the possibility that my present design will also double book people (place then on reception and telephone duty simultaneously).

View 3 Replies View Related

How To Name A Dynamic Range & Make A Validation List (of 2 Dynamic Ranges)

Dec 22, 2009

I have a range which will change in size & in content, & I want this to be a Named Range at whatever size it is.

Reason I want to is because I want to make a Validation List with this dynamic range. I also want a Validation list which lists the content of 2 or more dynamic ranges which may or may not be on the same worksheet - is this possible?

i.e.
First dynamic range: called "Milestones" at A11
Second dynamic range: called "Activities" at A25
& make a Validation list that will list content of both

View 9 Replies View Related

How To Create Dynamic List Within Dynamic Table

Oct 31, 2013

I have a dynamic table which is linked to a couple of charts. The table must remain dynamic.

I needed to add two new columns to the table, "Focus Area" and "Category". I need a drop down list in the "Category" column to be dependent on the item selected from a drop down menu in "Focus Area".

I can get the first row of the dynamic table to do this.... however; subsequent rows all lock the drop down list in the "Category" column to the same choices regardless of what is chosen in the "Focus Area" list.

Is there a way to make dynamic drop downs within a dynamic table?

View 1 Replies View Related

Random List

Nov 25, 2006

i have entered some values in excel like this

A1 B1
1 a
2 b
3 c
4 d
etc

i will put a command button, like "Randomise"
what i wanted is , if i click that command button, the Value in cell A1 should be remain same. but the values in B1 has to be randomly changed that is, eachtime i click the randomise button the value of b1 must keep changing for every click. someting like this
A1 B1
1 d
2 f
3 h
4 a
etc

View 11 Replies View Related

Drop Down List Font Size

Jul 28, 2007

How do you increase the font size of a drop down list in excel apart from zooming in. I have 10 dropdwnbxs each with about 16 items.

Everything works fine but users can not see the contents of each drop down box(fonts are too small). Is there a solution to this? (or just keep zooming in/out). Example i have a drop down box in A2 with source from F2:F17.....etc

How can i increse the font size?

View 9 Replies View Related

Font Size In A Drop-down List

May 16, 2006

I have a drop-down list that displays at about a size 6 (or smaller) font when the worksheet is displayed at 75-100%. I can make it readable by changing the magnification of the sheet to 150-200%, but that takes the rest of the sheet out of view, interferes with functionality, and is just an all-around pain in the butt. How do I format the list to make it display at a readable size?

View 9 Replies View Related

Creat Random List

Dec 31, 2008

I need to create a file with random purchase list that have some restrictions.
I’ve been working on this file for few days, but I couldn’t get desirable results.
Attached a sample file that describes what I did. It build up as the final file (just the final file has many more items).

I’ll try to explain what I need and how it works:
There are 4 categories: Theater, Salon, Kitchen & garden.
I need to create random lists of purchases (each list should be a line at the total sheet)
there is budget limitation of $100000. Each category has minimum items that must be purchase (headlines are in red color, total of 9 items).

The minimum items that can be on one list are 11 (9 red columns & another 2 random columns). Maximum are 15 items (9 + 6). Same item shouldn’t appear twice at the same list.
This file chooses randomly 19 items and check if the list stands up the budget.

There are 3 issues that I couldn’t solve by myself:

1.I should define the file to stay within minimum & maximum items per list (11-15)
2.Make sure it doesn’t go over the budget
3.Stabilize the list the values will not change each time I’m doing changes to file

View 11 Replies View Related

Random Name From A List That I Have Created

Apr 5, 2008

How do I get a random name from a list that I have created? The random feature only deals with numbers. I want to be able to push F9 or click on something and have a cell randomly pull a name from the list.

View 9 Replies View Related

Random List Creation

Jun 28, 2006

This might be a little complex to understand but I am going to try to make it clear as to what I am in need of. Basically I have a larger macro that runs and I need to add a pop up that asks for a percentage to be put into a new sheet. The percent is the percent of random rows on the current sheet to be put into a new sheet. Then it would have to create the new sheet with the random information. This is for a audit and we want to have it done randomly and no duplicates. There are no duplicates in the list at this point. The width if needed is from column A to column E.

View 2 Replies View Related

Generate File List With Name / Date / Size

Jun 10, 2013

I have a folder containing about 100,000 files and subfolders. Approximately 20% of the files are duplicates. I would like to create a list of all the files with some details so that I can sort through and identify which ones are duplicates, then create a batch file to delete them. How to get a file list with additional details, like size, modified date, etc, into an excel format?

View 3 Replies View Related

Listbox Increasing In Size As List Grows

Dec 14, 2007

I have a listbox on a worksheet which is linked to a named range, the named range is a results from a database query. Now the problem I have is everytime the query is refreshed the listbox expands in size. Is there anyway to stop the listbox from growing thus 'locking' the size??

View 4 Replies View Related

Generating Random Number List

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

Select Random Number From List

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

Select 30 Random Items From A List

Apr 30, 2014

I've got a list of items (formatted alphanumeric) in column G starting at row 2. I would like a cell formula that would randomly select 30 items from this column and place them in column H starting at row 2. One caveat is that the list must remain static once created. If the Rand()function is used, it recalculates whenever the worksheet is updated so that might be a problem.

Cell formula to do this? A VBA solution would be OK as well.

View 9 Replies View Related

Pulling Random Names From A List

Jan 12, 2007

On my excel spreadsheet, I have a list of 14 names in column A (row 1-14).

In a separate cell, I'd like for it to pull a random name from that list. How would I go about doing that?

View 9 Replies View Related

Create New List Based On Data From Another Dynamic List

Jan 4, 2013

I've attached a spreadsheet showing the effect I'm trying to achieve. A list (which changes weekly) contains employee details and length of service. Based on the length of service I need to build a new list grouping the employees based on the service length.

list-test.xlsx‎

View 6 Replies View Related

Data Validation Drop Down List Font Size?

Nov 21, 2006

I have noticed that all the cell dropdown lists i have (created by using Data | Validation | Allow | List) are very difficult to read its as though the font is size 8 or 6 or even less, is there a way of displaying the dropdown contents in a larger format? i have tried changing the font size of the named range and of the cell holding the dropdown but to no avail.

View 4 Replies View Related

Font Size Decrease In Data Validation List

Oct 5, 2007

Using excel 2007, I have a worksheet with numerous data validation drop down lists. I was making a few changes to the worksheet and then I restarted the code. The font size of all my drop down lists displayed as a smaller font (maybe 2 sizes smaller) than had been displayed before. I went back to a previously saved copy of the code and the font size in the drop downs is back at the original size. Did I do something to cause this or is it excel 2007?

View 8 Replies View Related







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