Calculating Percentiles Of A Selected Range
Apr 12, 2014
What I need is the following: I select a range of numbers and for this range I want to calculate the 1/3th and 2/3th percentile, and these should come in two cells that I can easily change in the vba code.
Some formula in which I can give two inputs: first the range of which it has to calculate the 1/3th and 2/3th percentile and a second input which is just a number and than the vba should say whether that second input is in the first range (between 0 and the 1/3th percentile value) or in the second range (between 1/3th and 2/3th percentile values) or third range (between2/3th percentile value and highest value).
View 1 Replies
ADVERTISEMENT
Dec 5, 2008
For my Intro to Engineering class, I collected data of two filter media in the laboratory. The data included the % of the media which passed through a sieve and the sieve openings. For use in a certain equation, I need the opening size at the 10th, 30th, 50th, 70th and 90th percentiles. I've tried searching on the Microsoft website but I don't think the PERCENTILE function will work correctly with the given data. I also tried using the slope between points to find the opening sizes at the percentiles mentioned, but doing so yielded different results from my professor's. Attached is the data I collected organized in tables and graphs of the data. I have also attached a pdf file of an example which my professor has given us.
View 5 Replies
View Related
Jul 15, 2009
Is there a function in Excel that would calculate the 85th & 90th percentiles based on the 50th & 75th percentiles.
View 2 Replies
View Related
Dec 25, 2013
I have a problem with using VBA to calculate max/min within multiple selected ranges.
Here is the file: [URL].... I've also attached it below the post.
Column A to D contain the raw data, column G to L contain the trading data. Each trade is marked with "tick" which consists one buy/sell and one close. The entry and close date&time are also included. Then how to match each entry and close date&time from right to left and therefore to look up max/min value within entry and close time from the raw data in the left columns? Respectively, I would like to calculate the min(low) for a buy/close tick and max(high) for a sell/close tick.
The challenges for me:
1.How to match, or reference from the right to left. I knew that "vlookup" could only match one certain value. (correct me if I didn't know enough about "vlookup")
2.The date&time in the left are time intervals while those in the right are time points. How to refer and locate them?
3.In the right side, length of intervals that each tick marked (i.e.from buy to close) are not the same, so should I use a array to contain the length, and then calculate max/min within each? When the data amount get larger, it is not possible to manually use "min" function.
example2.xlsx
View 3 Replies
View Related
Jul 25, 2014
I am using this code to hide or unhide rows of text on another sheet:
VB:
Sub ProcessSheet1ChangeOnCellJ7(ByVal Target As Range)
Dim sAddress As String
Dim sValue As String
'Get the address of the cell that changed without '$' signs
sAddress = Target.Address(False, False)
[Code]....
When the "Not Pursuing" list box option is selected (in cell "J7" or "J8" in Sheet 1) I need to add (or over-write) "Not Pursuing" to the range of cells in column "B" (in the "Tasks" sheet), but only for that particular Goal, meaning a limited range of cells in column "B". If the "Pursuing - Show All Tasks" option is selected for a Goal then these same cells need to be blank so that the appropriate person can enter their name into the cell.
The purpose for adding "Not Pursuing" automatically to these yellow highlighted cells is that it will facilitate filtering of tasks by individual in the "Tasks" sheet..
Again I have tried several times to upload a sample file and am unable to, which I know makes it more difficult to solve. (Is there some common mistake people make? I know it's an allowed format and is very small in file size....)
Code solution can be entered directly beneath:
VB:
If Target.Value = "Not Pursuing" Then
ActiveWorkbook.Sheets("Tasks").Rows("29:29").EntireRow.Hidden = False
ActiveWorkbook.Sheets("Tasks").Rows("30:48").EntireRow.Hidden = True
View 1 Replies
View Related
Jun 14, 2005
I am going to be gathering some raw test results soon, and I need to create a percentile for this particular group of results. way to do this in Excel? Or at least point me in the right direction? :o
View 9 Replies
View Related
Jun 3, 2009
Need to calculate different percentiles based on different grades. how do I put an 'if' loop or anything else that will work for this.
GradeAmount
B23
B22
B35
B36
B48
B49
B510
B511
B615
B23
B37
B614
Need function for the table below
Percentile10%25%50%60%75%90%
B2
B3
B4
B5
View 12 Replies
View Related
Oct 28, 2008
I have a dataset (20,000rows) with Grade, Region and Salary. I need to calculate the 25, 50, 70 and 90 percentiles against each concatenated Grade and Region.
View 9 Replies
View Related
Oct 9, 2009
What could be the syntax (in a code) for averaging a range in col C. the range values are given in E3 and E5. (E3=508 & E5=1200) These values changes each time I open the workbook.
View 2 Replies
View Related
Oct 13, 2011
I have a need to calculate the latest and earliest date in a given range, but I cannot seem to make it work properly. The range looks like this:
Code:
23/08/201120/08/2011 13/08/11 13/08/11 13/08/11 13/08/11
and the code is:
Code:
d1ST = Application.WorksheetFunction.Max(rRow)
No matter the information in the range, the statement is returning "0" (or "12:00:00") - I have tried setting d1ST as a date and double data type.
View 1 Replies
View Related
Oct 7, 2008
B C D
ON 135
NY 122
PA 117
WV 50
VA 126
NC 25
VA 35
MD 110
My issue: If ON I need to times (x) the miles (column C) by .0285 to equal D If NY I need to times (x) the miles (column C) by .0125 to equal D
View 3 Replies
View Related
Sep 16, 2009
I have a macro which I manually have to change the range in order to run the macro, e.g. Set rngData = Range("B4:I12")
rather than having to change the range for each macro, I was wondering if I could run the macro for the highlighted area. I have tried this, but doesn't seem to work.
Set rngData = Range. CurrentRegion.Select
View 2 Replies
View Related
Sep 10, 2013
If I have a list of 6 values and a number that I want to get as near to as possible (above or below) using any, and as many as needed, of these 6 values - is there a way of calculating the nearest value? And, if there is, is there also a way of showing which values would be used?
Example:
Value 1 = 0.190
Value 2 = 0.278
Value 3 = 0.593
Value 4 = 1.079
Value 5 = 2.075
Value 6 = 2.998
Value I want to get as near to as possible = 3.644
View 13 Replies
View Related
Feb 2, 2009
I need a way to calculate building rates based selecting the building and the value selected;
I have a list of building construction (fire resistive - protected, non combustible - protected etc)... in cell N8 and the limits in cell O8.
Now what I need to do is calculate the rates in the file attached (cells A5:J21 in my worksheet) based on the building construction and the value/limit I select.
View 6 Replies
View Related
Mar 24, 2014
I'd like to work out the average of a set of data which changes length and position. It's probably easier if I attach a workbook.
The different sets of data are split by blank cells so they can be distinguished.
View 6 Replies
View Related
Jul 10, 2012
I have a spreadsheet with Data in Columns A-H. Column B is an ID value that will repeat an unknown amount of times. For each Value in Column B I need to calculate the Median, Mean, and GeoMean for the corresponding range of "G_:H_"
Ex.
Column B
Column G
Column H
2
10
5
2
13
9
[code]....
I need the Median, Mean, and Geo Mean values to paste in Columns N-P for each different Station Index. My code only calculates for the first Station ID
Here is the code for what I have so far
Code:
Sub Median()
Dim r As Long
Dim stndx As String
Dim i As Long
Dim x As Integer
Application.Calculation = xlCalculationManual
[code]....
View 1 Replies
View Related
Aug 29, 2013
At the end of each month, my agency collects data about clients served in our programs. One of the many pieces of information they want is the number of "bed days" a client was residing within our programs for the given month.
For example:
Jon Doe entered the program on 7/16/13 and discharged on 8/15/13. I would like to know how to calculate the number of days in July that Mr. Doe was residing in the program. (The date of discharge is not included.)
I recently took over the responsibility of completing reports such as this one at my office. The previous person who completed the monthly reports would count the days by hand for each client, but I know there must be a better way.
View 6 Replies
View Related
Apr 28, 2014
I'm trying to calculate the average for a range that begins with cell B15 and has various end points, depending on the day (since I'm pulling 2 actual years of data that strips weekends and holidays, as opposed to going back a set amount of days/years). Syntax for cell B4 to reflect the average of range B15 to LastRow? I tried several things and it didn't work. Rows 1-12 are being reserved for the summary calculations that will then be pulled into the final Dashboard.
View 1 Replies
View Related
Oct 5, 2009
I'm currently on Manual Calculation mode. I have formulas in cells A1 to A10 which has not been refreshed. Can I select only range A3 to A6 and recalculate only those cells?
View 5 Replies
View Related
Nov 15, 2009
I need help please. Using a macro, I have selected the range C7:C12. Now I need to keep this selection and expand it 18 columns to the right. This would give me a selection of C7:U12.
The original range changes at various times. Some times it might be C7: C452 etc.
I know it's easy, but I can get the code to keep the selection.
View 6 Replies
View Related
Mar 8, 2012
I have a range (of 2 rows) that are set up as a header row and sub row. I want a macro to insert these above the active row (ie. where the user places the cursor), but when I select and copy the range in the macro, I don't know how to refer back to the 'active row' because that's not active anymore.
I'd also like the cursor then to be placed into one of the cells in the new row, ready for the user to start editing.
View 6 Replies
View Related
Jul 2, 2013
I am looping through a selected range. The code searches through column B and finds any data. If found, it returns the value to a different workbook to column B. When there is no more data, it goes to column C and does the same thing. My problem is, when there is no data in a column it returns a blank. How do i get rid of this blank???
View 1 Replies
View Related
Mar 16, 2007
Count & Sum is one of the most usefull function in the Excel,
I always used this, Is it possible in VBA to create such code that if I Select a range and click on Commandbutton1 automatically one msgbox display with the Count & Sum of the Range Item
eg. If Range A2 to A5 has a number like 50,10,20,10
here if the command button is click automatically one msgbox is display
which showing the
-Total Sum of the Seletced Range is 100 and Total Count is 4
View 9 Replies
View Related
Aug 10, 2007
I'm trying to create an if statement that have 2 criterias. Here's what I've created:
=IF(COUNT(F2:F4)=('2007Open'!H2:H4),COUNT('2007Open'!B2:B4)=8,'2007Open'!H2:H4)
This statement is returning the #VALUE error.
I guess what I'm trying to do with this statement is to count how many values are not equal to 2007Open!H2:H4 and meets another criteria of 8.
View 9 Replies
View Related
Jan 4, 2008
I am using the following code to Autofill a formula through a variable range:
Selection.AutoFill Destination:=Range(MyFormulaCell, TerminalCell), Type:=xlFillDefault
MyFormulaCell is the cell with the formula, and TermnialCell is a variable set on a count of rows. This is working great, and I can loop through this for the columns I need to copy just fine by incrementing values, but as I apply this to several sections, it's taking me up to a minute to run the macro. In this "I want it now" day and age, I'm sure my coworkers for whom I am making this will not be happy to wait that long.
Is there a way that I can incorporate a selected range into this method?
I'd like to set MyFormulaCell to:
Range(Selection, Selection.End(xlToRight)).Select
and then autofill the formula down the number of rows contained in TerminalCell.
View 9 Replies
View Related
Dec 3, 2008
I have a form that asks at what row the user wants to start with a selected range then how many rows to select. There will always be 21 columns selected with this range. I am still learning but it has to do with something on how I am setting the Start object. It is not being recognized.
Dim Row As Long
Dim Selection As Long
Dim Start As Range
Row = txtStartRow
Selection = txtHowMany
Set Start = Range("A" & txtStartRow).Select
Range(Start & ActiveCell.Offset(Selection, 20)).Select
View 9 Replies
View Related
Mar 17, 2009
My data is in one column as follows:
ABC
(BLANK)DEF (BLANK)(BLANK)
What I want to do is to delete the blank cells and count how many not-empty cells.
The following sub works fine if I put the active cell manually in A1. However, the first range select always give me the "1004" error. Why? I don't have any clue.
Range("a1:a5").Select
Do Until ActiveCell.Value = "stop"
Do Until IsEmpty(ActiveCell)
Selection.Offset(1, 0).Select
Loop
ActiveCell.Delete
Loop
View 9 Replies
View Related
Nov 29, 2006
I am trying to link data that has been entered into a inputbox with a range of cells.
My goal is to allow the user to answer: how many people sat the exam?
Therefore when a chart is automatically produced only the cells with the required data are selected.
So, my range is A2:C*
* being the user input.
View 4 Replies
View Related
Mar 15, 2007
I am trying to name a selected range in VBA in order to use it in a vlookup table. Code I have so far is as follows:
ActiveSheet.Name = TextN
Range("c9"). CurrentRegion.Select
Call formatting
ActiveWorkbook.Names.Add Name = "formTextN", RefersToR1C1 = Worksheets(TextN) & "!" & "r9c2:r45c13"
The formatting works, but the selection does not get named.
View 3 Replies
View Related
Jan 22, 2014
I need to calculate a Stdev and Average based on a specific range. However, my range is not constant in the time. For instance, today I may need to calculate these functions based on 30 numbers, but tomorrow on 25 or 15 or 50...
Is there a way to automate this process by changing the number of data points to include in the range in one single cell and avoid manually adjusting the range in accordance with needed data points?
In other words, I would like to change the value, let's say in Cell A1 from 30 to 50 and then Excel would re-calculate the StDev and Average based on 50 data points and not 30. Is that possible?
View 12 Replies
View Related