I am trying to use the averageifs function in excel to find the average that meets a date criteria and is below three standard deviations.
This is what I have
=averageifs(R16:R38375,R16:R38375,"<U19",P16:P38375,U16)
The P column contains the date range and U19 is the date criteria.
I have also tried array functions with no luck. Thank you in advance for the help.
You need to take the less than operator alone in the quotes and concatenate the cell reference off the right end.
=averageifs(R16:R38375, R16:R38375, "<"&U19, P16:P38375, U16)
AVERAGEIFS function
Related
Trying to run an AVERAGEIFS function across a date variable AND either criteria 1 OR criteria 2 out of a second range. Concept is below. I've found SUMPRODUCT or array formulas to solve the OR problem, but I'm not sure how to combine the date to those solutions. Thanks!
=+IFERROR(AVERAGEIFS(AVERAGE RANGE,CRITERIA RANGE,(Criteria 1 OR Criteria 2),DATE RANGE,DATE)"")
You will need to use SUMIFS and COUNTIFS:
=IFERROR(SUMPRODUCT(SUMIFS(RANGE,CritRange,{Crit1,Crit2},DateRange,Date))/SUMPRODUCT(COUNTIFS(RANGE,CritRange,{Crit1,Crit2},DateRange,Date)),"")
I'm trying to make a COUNTIF that checks range E8:AI8 for the letter "D" and the range E7:AI7 for any of the following numbers 2;4;8;9;15;20;26;27;33;34;40;41
Also cells in range E5:AI5 to not equal any cell in C105:C118
E5:AI5 is dates in a calender.
C105:C118 is a list of dates for holidays.
My formular so far is looking like this:
Sumproduct(countifs($E$8:$AI$8;"*D*";$E$7:$AI$7;
{2;4;8;9;15;20;26;27;33;34;40;41};$E$5:$AI$5;"<>"&$C$105:$C$118))
However its not really turning out like i want it, the first two parts of the fomula are working as intended, but the last part comparing the row to the list of dates is not. Is it even possible to compare a row to a column? Or is there another way to do this?
That is not something you can do really inside a COUNTIFS() as described here. Consider to use SUMPRODUCT() with some MATCH() nested inside:
=SUMPRODUCT((E8:AI8="D")*(ISNUMBER(MATCH(E7:AI7,{2,4,8,9,15,20,26,27,33,34,40,41},0)))*(ISNA(MATCH(E5:AI5,C105:C118,0))))
I have collision data in column F I have the years from 2004-2015, I have named the range ATT_YEAR and In column G I have the dates and the range is named ATT_DATE. What I am trying to do is to either use COUNTIFS or SUMPRODUCT to determine the number of collisions by month of the year, if I select the year as say 2013, I want to show the number of collisions by month.
I was trying the following the formula:
=COUNTIFS(ATT_YEAR,"2013",ATT_DATE,MONTH=1)
but not getting very far with one.
Or when I tried using sumproduct formula:
=SUMPRODUCT(--(ATT_YEAR,"2013"),MONTH(ATT_DATE)=1)
I would be grateful for any assist on either of these.
I think you are using the formula wrong:
=SUMIFS(COLLISION,ATT_YEAR,2013,ATT_MONTH,1)
This will count all collisions in the named-range "COLLISION" only if 2013 is matched in the named-range "ATT_YEAR" and 1 (i.e. January) is matched in the named-range "ATT_MONTH".
edit
Needs updating, wrong assumptions.
You cannot use MONTH, which is the function you need, inside COUNTIFS. Instead, create another column, with the formula MONTH(B2), assuming column B has the date values, and use it as a new ATT_MONTH range:
=COUNTIFS(ATT_YEAR,2004,ATT_MONTH,6)
=SUMIFS($B:$B*$N:$N,$N:$N,">=5",$N:$N,"<10")
I want to multiply 2 columns and sum all instances of it, conditioned only on one of the columns.The formula gives an error because I multiply in the first argument, which just should be a single number I guess. I tried using SUMPRODUCT too, but as column B does not have a condition, it doesn't work. Can anyone advice please. Thanks in advance.
The equivalent SUMPRODUCT formula for your SUMIFS attempt is:
=SUMPRODUCT(B:B,N:N,--(N:N>=5)*(N:N<10))
But you should avoid using full column references in SUMPRODUCT. If you can't limit range sizes, consider using dynamic named ranges.
try:
=SUMPRODUCT(B:B,IF(N:N>=5,IF(N:N<10,N:N,""),""))
with array ctrl+shift+enter
Column A is date
Column B is criteria
I want to find the MIN date for each criteria. I tried using Ctrl+Shift+Enter with
=MIN(MATCH(B2,B:B,0))
but thats not quite right because I need to refer to Column A somehow to get the date. I'm pretty confident this can be done with arrays, so any help would be great.
Try this (array formula):
=MIN(IF(B2=B:B,A:A))
An even more compact array formula is:
=MINIF(B2=B:B,A:A)
NOTE 1: Complete using Ctrl+Shift+Enter to enter the formula as an array formula.
NOTE 2: The two-formula method (i.e., using =MIN(IF(B2=B:B,A:A))) is more flexible and works in more cases than the single-formula method shown here but I've included it as an answer as a possible option.
=SMALL(INDEX(($F$2:$F$14=F3)*$D$2:$D$14,),SUM(COUNTA(F:F)-COUNTIF(F:F,F3)))
If your criteria is repeated and want to find the min date for that you can use this without shift+ctrl + enter function.
date is D column
criteria is F column