Actually with the help of array formula I"m taking out Average, Min, Max value of ranges and I was omitting zero but the problem is occurring that if i have originally zero in my ranges then Average & Minimum function is not working properly.
I am trying to automate a process involving a Grubb's outlier test and calculating averages/stdev of a set of numbers. I have the data in one column and have calculated the average/stdev/%CV of that data. I have also added a formula to calculate Max/Min outliers of that column of data. Then there are cells with IF statements that display either "yes" (for an outlier present), or "no" (if no outlier is present). What I would like to do, if it is feasible, would be to set up formulas to recalculate the average/stdev of the column, taking into consideration either the presence or absence of outliers.
Here is what I invision(cells are for example purposes)
=IF((M9 = yes, Avg(H2:H40)-max(H2:H40)),M9 = no, avg(H2:H40))
So it would calculate the average without the outlier if the outlier "yes" was present, or just calculate the average if "no" is present.
I would also do this with a minimum outlier as well, but i can set that up if this first one is possible.
I have a load of (multiply duplicated) categories (in col G) and values for them (in col P). Each category has more than one value, but they should be in roughly the same ball-park. I want to rank the categories in a pivot table, by value, not alphabetically. So I wrote this formula:
{=MAX(P$2:P$10*(J$2:J$10=2)*(G$2:G$10=G2))} (I also am only interested in entries for which there is a "2" in column J as shown)
This takes the category, finds all instances of the same category in col G and returns the max of all of them - so each row now has a "max value for this category" field.
This is all great, but what would work a lot better would be grouping them by the minimum value in the column, but of course when I do this I get a zero (from any one of the hundreds of non-matches).
I tend to get non-zero mins using small and countif but can't conceive how I would squeeze that into this formula.
Attached is a print screen. I'm struggling with using the min function in vba. I want it to find the minimum cumulative cost in week 0 out of the first three, and the copy the permutations of it (1,0 or 1, 1 , e.t.c.) to Week one column C & D of the model.
Trying to average multiple cells that are not consecutive and contain zeros that i want to disregard. I have tried to do an array formula but the cells must be consecutive so I am at a loss. This is what i tried. =AVERAGE(IF(A2,A8,A12<>0,A2,A8,A12,””))
Can I get a minimum average and a maximum average, I have a worksheet with days of supply for 100 stores with about 100-200 products each, the dos resides in column D.
I was going to create a summary page and reference column d.
The following just gives me the min, I want the min average if possible:
I have looked on here and I can find the minimum value in my range but what I am trying to do is find the minumum two values. Or rather, i want to find the average of the remaining values.
If the lowest value happens THREE OR MORE times, i still only want to exclude two of them. Same thing goes if the second lowest happens more than once, i only want to exclude at most two values from the avg.
currently, i have 12 values in my list.
example:
list --> one in each cell going across
25, 50, 87, 56, 99, 80, 81, 82, 50, 100, 98, 99
i have the answer as 83.2 doing it by hand. the 25 and one of the 50s would be dropped and the rest would be averaged.
I wonder if it is possible to formulate a formula in which average values are recalculated after every added record.
For example: Record 1 shows an amount of 200 so the average value after 1 record is (200/1) 200. Record 2 shows an amount of 250 so the average value after 2 records is ((200+250)/2) 225. Record 3 shows an amount of 210 so the average value after 3 records is ((200+250+210)/3) 220.
I don't want to calculate all averages manually and most probably there must be a formula that is able to recalculate the average value after another record is added to the file.
I am using Excel to use stock ticker symbols such as FDX "Fedex", to return past volume and price daily performance found in Google Finance that will be manipulated with the current VBA I am working on that will result in a trading pattern. Each trading pattern will happen at a different range in the same column. I will be inputting hundreds of ticker symbols daily so using VBA and not having to enter formulas manually in each is greatly preferred as this will save me lots of time.
I am stuck trying to find the average value of a range starting from the minimum to the maximum value. For instance, Range("H10:H20") may have a maximum value at range("H12") and a minimum at Range("H18"). I would like the average of Range("H12:H18").
Sub Fnd()
Dim MaxStartPriceRange As Range Dim MinStartPriceRange As Range
Dim MaxPriLocation As Double
Set MaxStartPriceRange = Range("h11:h21") MaxPriLocation = Application.Max(MaxStartPriceRange)
Set MaxStartPriceRange = MaxStartPriceRange.Find(MaxPriLocation)
I'm just getting into functions, so please bear with me on this as I start to understand how they really work. I do have the VBA and Macros for MS Excel book which has been a great help!
Normally on this I would use a simple array formula to gather a total calculation from a timesheet, but in this case there can be numerous timesheets to add this up.
Hours would be recorded on a sheet with both a client and a task selected. I also have a summary sheet to show clients against tasks... adding all the hours from each timesheet.
If it were from a single Timesheet (possibly creating a single one of these for all sheets is an option?) I would be able to use the following array formula:
=SUM(IF((Timesheet1!$F$8:$F$22=C$5)*(Timesheet1!$G$8:$G$22=$A9),Timesheet1!$D$8:$D$22)) Timesheet1 Column D = hours Timesheet1 Column F = clients Timesheet1 Column G = tasks Row 5 (starting Column C) = clients in summary sheet (across top) Column A (starting Row 9) = tasks in summary sheet (down side)...........
I have a problem with an array formula where I want to sum the values in every 7th row. The problem I have is I am receiving #VALUE! in my returing cell of the formula when there is text in the array. Is there a way I can avoid including the text in the array or maybe error checking using ISERROR and ISNUMBER.
The array formula I am entering is: [Code] .........
What would the formula be to calculate that array of values = 57% because 4 of them are equal to or greater than 9, and there are 7 of them in total? The formula should accommodate however many numbers are listed and calculate what percentage of them are 9 or 10.
The following formula is all on one line. I want to do indirect for file name and tab in all instances it shows up. (I want to have the filename in one cell and sheet/tab name in another cell to reference the indirect to.)
How would I use indirect in the formula to reference the cells?
I have dates & times in column A1:A20. In B1:B20 I have the corresponding temperatures for each date. I have set up the following dynamic ranges to refer to these ranges.
DateRange refers to A1:A20 TempRange refers to B1:B20
I have also made a user defined function that will determine if a date/time is between two times. Eg., If 21/05/06 07:30 is between "07:00" and "17:00". This function isn't concerned with the date, just if the time falls between the start and end times.
Function BetweenTimes(dDate As String, dStartTime As String, dEndTime As String) As Boolean
I am working on two spreadsheets, one we shall call Target Sheet and the other Reference Sheet.
On the target sheet, I have a set of 200 geographic coordinates longitude and latitude (in decimal degrees). Each pair of coordinates coresponds to a geographic site.
On the reference sheet, I have a set of 900 geographic coordinates longitude and latitude (in decimal degrees). Each pair of coordinates coresponds to a geographic site. Note that of the 900, 200 are the same from target sheet, other 700 are different sites.
Using the spherical law of cosines, I can calculate the distance between a set of coordinates on target sheet agianst a set of coordinates on reference sheet. This allows me to see the distance from one geographic site, to the other. This was easy. The formula I use is as follows: ....
I need to find a way to find an array in a tab to use for an index/match function I have.
this is what i would normally use: =index(tab_array,match($a2, tab!$a$1:$a$1000,0),match($B$1,tab!$a$1:$zz$1,0))
This formula would usually work fine when I know that within the tab, the array in which the row match is searching doesn't change. However, that array may change in the future, to say column H, without my knowing as it is a database that gets automatically populated from an upstream system.
Is there a way to search for an array within an index/match?
I'm looking to loop a comparison code. I'm using dynamic referencing (using x and y) to find maximum values for specific time intervals. The code works on a cell to cell basis, meaning if I input the formula and change the cell referencing manually then the equation will give the desired results. However when I attempted to create a VBA code to speed up the process I kept getting a 1004 Unable to set FormulaArray Property of the Range Class error, I later figured out that the Formula Array function is limited to a certain number of characters so I split up my function into 3 different string formulas. I still get the same error.
I have 3 columns 1st one has numbers that reference a wellbore.
2nd have a depth
3rd has a number value (a mud weight) volume
Well API example Depth Weight 42050102600000 10000 10.2 42050102600000 9500 9.2 42050102600000 6500 8.5 42050105000000 12000 11.0 42050105000000 7500 6.0 42050105000000 10200 9.5 42050110100000 8000 8.0 42050110100000 9500 9.2
I want the formula to give me based on the well API number the max depth and the weight associated to that max depth. And the minimum depth and the weight associated to that minimum depth. I'm not sure how to say it in a formula. I don't want to use VBA.
To highlight largest and smallest values in a worksheet I have used large and small function to calculate and then and index to highlight name attached
I have 3 columns of numerical data. In my fourth column, I would like to return the minimum value from the 3 previous columns (=min). However, instead of returning the lowest number, I would like it to return the column title (=text) of the lowest number. I haven't been able to locate a function that does this.
TotHCInv.Value = WorksheetFunction. Sum(KRInv, PBLInv, CRInv, PVInv) If i >= 34 Then CPSCtphRMA.Value = WorksheetFunction.Average("G" & (i - 30) & ":G" & i)
The first line runs properly, but the second line bugs out with the error message "Unable to get the Average property of the WorksheetFunction class". I can simply do the math, but I thought that using the worksheet function would be easier than summing and dividing. I'm curious, though, as to why I can't seem to use the Average function.
I had an Excel 2003 spreadsheet which used =average(if... array formulas. I'm trying to do the same thing in 2007 but it's not working....I know there is an averageif function in 2007 but some of the people who'll be using the spreadsheet are still on 2003 so I need a formula that works for both.
I have Column A which is an Employees birth Year, Column B which is salary, and Column C which is a list of Years.
I need a formula to read the Year in Column C, refer to Column A finding all the rows that match that year, than refer to Column B (salaries) and find the average of the salaries.
I am using the following array formula to give the average number of days aging on overdue reports for my staff where Manager and Aging_on_Overdue are named ranges in my input data: {=AVERAGE(IF((Manager="Joe Smith")*(Aging_on_Overdue>0), Aging_on_Overdue))}
This works fine as long as Joe Smith has Overdue reports, but returns a # DIV/0 if he has none. How do I get a formula to return 0 if he has no overdue reports? I need this because I have to do a weighted average of the group and my SUMPRODUCT formula returns a #DIV/0 for the group if any member of the group has no overdues.