Creating Array Of Numbers With Specific Definitions?
Feb 3, 2014
Lets say I need an array of 100 numbers from zero to 100. I want a mean of 75, and SD of 12. Or the same data based on a skewness and kurtosis value. Can I do that in Excel?
I'm just generating fake datasets for my stats class to analyze.
Edit: I found that =norminv(rand(),,) will work.
View 1 Replies
ADVERTISEMENT
Nov 28, 2011
I'm new to arrays. They seem promising for what I want to do though...
Heres where I'm at. I have some data like this:
items freq 1 0.5 2 0.5 3 0.5 4 0.25 5 0.25 6 0.125
Now, I've created a 2 dimensional array, as such:
Code:
Sub testarray()
Dim arr1 As Variant
Dim rng1 As Range
Dim lngX As Long
Set rng1 = [A2:A6]
ReDim arr1(1 To rng1.Count, 1 To 2)
For lngX = 1 To rng1.Count
arr1(lngX, 1) = rng1.Cells(lngX, 1)
arr1(lngX, 2) = rng1.Cells(lngX, 2)
Next
End Sub
Now, what I need to do, is create an array for each freq of all the items that share that freq. Essentially I need this:
0.5 {1,2,3} 0.25 {4,5} 0.125 {6}
Now, I was thinking, if I could create a dictionary object and make the key the freq (so my keys would be 0.5,0.25,0.125) then I could assing the "item" an array (or another dictionary) holding the items that apply to that freq.
View 9 Replies
View Related
Nov 28, 2013
I am using formulas that use ranges in outside file locations. Due to my company's file management "nuances" the file paths are exceedingly long and make it difficult to read formulas. Can I use the Define Name feature to enter the external file path and file name? My attempts so fare don't seem to be working.
View 1 Replies
View Related
Mar 30, 2014
I'm trying to find definitions/commands to make excel find the best combinations of several defined scopes and restrictions to make an output number as high as possible.
This is by using a combination of several different equations, maybe excel has a magic trick for all the variables and formulas.
Attached File: forum_heatexchanger.xlsx
View 2 Replies
View Related
Mar 9, 2009
I have created a dictionary with technical terminology. It is in excel format with about 10,000 entries. The format of my dictionary ("Sheet1") is in three columns:
<vocabulary term> <pronunciation> <definition>
Now, I want to create vocabulary lists using my dictionary. The newly typed up vocabulary list (which only has the term, but not pronunciation or definition), will be copy and pasted into "Sheet2".
The "Sheet2" typed up vocabulary list is in the format:
<vocabulary term 1>
<vocabulary term 2>
etc...
I want to run a macro or script to dictionary terms (including pronunciation and definition) from "Sheet1" and put them into my vocabulary list "Sheet2".
The desired output list in "Sheet2" is: .....
View 11 Replies
View Related
Apr 10, 2014
I am currently working on a performance document. I am working on the principle of having a master template which people can then access, Save As, and use to monitor performance around KPI's.
The issue I am having is around the name of the document changing when it is saved as, as all records have to retained. The macro I am struggling with is designed to unlock the workbook & worksheet, copy the worksheet specified into a new workbook and then return to the workbook the macro is held within and lock it back up. However, when the name changes it just locks the new workbook rather that the version I am asking it to.
ActiveWorkbook.Unprotect Password:="KPIreview"
ActiveSheet.Unprotect Password:="KPIreview"
Sheets("EID Graphs").Select
Sheets("EID Graphs").Copy
[Code] ....
Is there anyway I can change the “Kent – Monthly Activity & Performance Review – Version 17 – Master.xlsm” statement within the macro to reflect the change in name of the document?
View 2 Replies
View Related
Mar 23, 2007
How can I copy the Named Range definitions from one worksheet to another in the same workbook? In case it matters, the Named Ranges refer to cells in a third worksheet in the same workbook.
View 6 Replies
View Related
Oct 9, 2009
Here is what i am trying to achieve. If the date 2/20/2010 is located at F53 & the cell next to it at H53 is populated with a number between 1 & 16, then i want the cell at J11 (42 rows further up) to auto populate with the number 1. When this occurs the cells beneath this, from J12 to J52 should also auto populate with the with consecutive numbers from 2 to 42. Would also like to see the cells with numbers 1 to 28, automatically format to orange & the cells containing numbers 29 to 42 automatically format to yellow. I plan to have this condition repeat several times later in the year, at dates that are to be decided. When these dates are decided i want to be able to enter a number from 1 to 16 & next to the date & all of the above automatically occurs.
View 14 Replies
View Related
Jul 7, 2014
I am trying to create a list from an array. Said array contains formulas that return numbers from input contained in an other table. I would like the list to list the numbers in ascending numerical order.
View 5 Replies
View Related
Feb 27, 2013
I want to create a multidimensional array. Basically, I want to tie a file to a sheet. I want to import the following files:
"byemployee.csv",
"byposition.csv",
"Status report.xls",
"bydepartment.csv",
"byband.csv"
to the following sheets in my workbook:
"byEmployee",
"byPosition",
"statusReport",
"byDepartment",
"byBand"
Basically, I would like to pass the array by reference. Basically, the code below imports the file into my workbook, but I since I have several files going into sheets in the workbook, I don't want to write the code 5 times. I figured the best way would be to create a multidimensional array and pass through my procedure below.
Code:
Sub import_Employee_Data()
strSourceFile = ThisWorkbook.Name
strPath = ThisWorkbook.Path & ""
strFirstImportFile = strPath & "byemployee.csv"
sDestSheet = "byEmployee"
If Len(Dir(strFirstImportFile)) > 0 Then
[code]......
View 8 Replies
View Related
Mar 5, 2008
I am trying to do is, to sum up the values in an array, given that the cell value is not an error.
If the cells were in order, the following array formula would solve it easily:
{SUM(IF(ISERROR(A1:A3),0,A1:A3))}
But my problem is that, my cells are not in order. To be more specific, I want to look at A1, B12 and C13, and sum them up with an array formula given the condition that cell value is not an error. Of course, in my case, I have too many cells.
View 11 Replies
View Related
Mar 23, 2012
I need to create multiple arrays arr_1(), array_2(), array_3() etc. Each array will be used to store different data.
My idea was to create a for loop like the one below, which doesn't work.
Code:
For i=1 to 180
String = i
then initialize the array
Dim arr_& String ()
Redim arr_& String(1 to 183)
Next i
View 4 Replies
View Related
Jun 19, 2008
I need to know if theres a function (or method) in excel thatll allow me to select an array of numbers and once those numbers are selected, to use only the numbers (for an averaging function) that yield the best sigma?
View 9 Replies
View Related
Jan 8, 2010
i am trying to create an Array that will print the stock number as a title on row A. e.g. "Stock 1" in A2 "Stock 2" in A3...etc. here is what i have attempted:
View 2 Replies
View Related
Jan 17, 2014
I had some number combinations as this 5-23-34-233, 50-233-34-45, 34-5-23-45-67. The length can be variable in column A.
I want a formula which should return array of numbers of each cell in column A. So if A1 has 5-23-34-233 so the formula should return array like {5,23,34,233} and like wise.
View 8 Replies
View Related
Jan 22, 2009
[Sheet] .....
I have the above sheet, what i need to do is pull all records to a seperate sheet. The records need to be between the start and end dates and have no full reply. Please help. I am using excel verion 2003.
View 11 Replies
View Related
Mar 13, 2008
Is there a way to make a macro convert '1' to Yes and '0' to No? I have 2 columns (F and G) in a worksheet that contain the value of 1 or 0, but I need to convert them to Yes or No. I have tried some fo the samples but they pop up a msgbox which is not required.
View 2 Replies
View Related
Dec 28, 2013
How can you sort item numbers, targeting only the numbers in the mock up file?
Example:
item number: GW14SO0000003
item company: GW
item location: 14SO
item counter: 0000003
How can I only sort the item by the last 7 digits "0000003"
View 1 Replies
View Related
Jul 30, 2014
VB code, recorded by macro, it is working, but I need create different workbooks with different names , this one create just one specific name here is the first problem , second would be for saving in desktop folder "Ataskaitos" here another because it just for my computer , on other computer directory would not be found and third , then I deleting existing sheet in workbook from there I run the macro and copy sheet to new workbook it asking if I sure want to delete that sheet, so I don't need asking that I just need to delete it
VB:
Sheets("Ruooinys" & i).Select
ActiveSheet.Cells.Select
Selection.Copy
Workbooks.Add
ActiveSheet.Cells.Select
[Code] .....
View 2 Replies
View Related
Jan 2, 2014
We collect loan payments for 36 months from customers.
Column A lists 1000+ customers.
Column J lists the date we received payment 1 ... Column Q lists the amount we received on payment 1.
Column R lists the date we received payment 2 ... Column Y lists the amount we received on payment 2.
Column Z lists the date we received payment 3 ... Column AG lists the amount we received on payment 3.
This repeats for all 36 payments.
New customers are loaded in each month, so be aware that Column J, Column R, Column Z (and so on) have dates from 2011 and 2012 and 2013.
We'd like to create a list of all customers that have not made a payment for the current month as of a certain day (say the 12th). So this month, on January 12th, we'd like to search our data for all customers that don't have a payment listed between January 1st - January 12th.
View 14 Replies
View Related
Dec 8, 2008
I was wondering if someone could help me generate a Macro to do the following:
I have a sheet with the following characteristics.
Column A, rows 8-15 contain headers
Column A, rows 17-24 contain headers
Column A, rows 26-40 contain headers
Column B to CV, row 6 may or may not contain an "X"
Column B to CV, rows 8-15 & 17-24 & 26-40 may or may not contain the various data
I need a macro which does the following on the press of a button located somewhere on the sheet:
Generate a .TXT file in the folder C:Test with the name "Test_YYYY_MM_DD_HH_MM_SS_Full.txt" which uses the system time and date to fill in the values In the TXT file the following data should be created: ....
View 7 Replies
View Related
Jul 7, 2012
I am having some difficulty with a pdf that I converted to an excel document because I wanted to use the data from the pdf tables in a different program I am currently working on. However, the data is in the improper format. For example, in the table it reads 2-1/8 as string and I want it to be the number value 2.125 . Likewise if the value in the table reads 5-1/4 I want it to automatically convert it to something that will be read as the number 5.25
View 4 Replies
View Related
Sep 13, 2007
I'm basically creating a file where a userform comes up when you open the workbook, blocks the access to the actual workspace so that no manual entry can be done. What the userform allows you to do is add a new entry to the database (the userform has some text boxes where we type in stuff like location and name or age) after having found the next empty row in the enormous database (3.000 lines)
After having clicked the OK button in the userform and added the data to the database, I would like the userform to have a pop-up message box with specified text like:
"The number assigned to this entry is:" and then I would like to add a variable with excel using the cell in column D of the same row of the new entry. So the end result would be :
The number assigned to this entry is: 01
View 9 Replies
View Related
May 15, 2014
I have an excel workbook with about 40 worksheets. I have a formula in A1 of each sheet that returns a 1 or a 0 depending on whether or not the name of the worksheet is in a list.
What I am trying to do is create a macro that will print all worksheets that have a 1 in A1.
View 2 Replies
View Related
Jan 7, 2010
I am trying to create the function below:
View 3 Replies
View Related
Jun 2, 2006
Im an using excel to run a simulation of demand over a period of 200 days. i have an average daily demand of 7.75 and a stdev of 2.6. Is there any way to generate random numbers (for daily demand) based on this data?
View 3 Replies
View Related
Jun 6, 2006
i need to make a formula for excel which will verify if my actual value falls within a specific range. for instance if my value is 0.15 and the allowed range is 0.145 to 0.155 then i want to display the number zero in the cell however if the actual number is above or below the range i want to calculate the amount of deviation from the range
View 2 Replies
View Related
Jun 3, 2014
I have to create ranges of unique numbers that follows the below rules.
1) Have to start with 3 standard digits (ie 101 or 102 etc)
2) The total length of the is has to be 10 digits (ie 1010123456)
3) The second part (the last 7 numbers) must be unique!
4) Can create a lot of numbers (more that 5000 rows)
5) thats all with the unique numbers
Continue,
Somewhere in the sheet has to be a search function to find where a specific id is located, make it red and copy/cut in to another sheet.
View 7 Replies
View Related
Jan 10, 2007
I have a list of numbers . Several numbers are pulled, based on criteria, and then I need to create a list with just the remaining numbers.
EXAMPLE:
A) Numbers 1 - 500, defined by name (So I can INDEX them later)
B) Pull out numbers 47, 3, 143, 224 (based on certain criteria)
C) By INDEXING the field, create a list of numbers 1 - 500, omitting the above numbers.
I have no problems with steps A & B. I can't do step C.
View 9 Replies
View Related
Jun 29, 2006
I cannot find the right catagorty I need to use to word this. I know there is a formula out there. I basically have 1k numbers I need to add into Collumn A of a worksheet - the numbers are from range 34-2501 through 34-3500. How can I get excel or VBA to do this automatically?
34-2501
34-2502
34-2503
repeat til
34-3500
Also, how to make it user friendly to create the same process over and over with a different set of numbers... meaning make it so I onlt have to input the range or numbers over and over. if it is an easy task I do this allot
View 3 Replies
View Related