I am using the formula shown in the picture and what I want it to do is average the MinOscilation value categorised by date. That way for example I can get an average for everything on 30/04/2021, 04/05/2021 and like that) but when I try to do that I get an #DIV/0! error and I'm not sure exactly what I am doing wrong.
The syntax you are using is for the AVERAGEIFS function. So either use that, or switch the arguments to the correct order for AVERAGEIF:
=AVERAGEIF($G$22:$G$36,G40,$H$22:$H$36)
Related
I've got the following formula
=COUNTIFS(MachineData!N:N,{"*Arlington*","*RenewNorfolk*"}, MachineData!$X:$X,"Y",MachineData!$E:$E,"<>*rinse*", MachineData!$C:$C,">="&$O$15-30, MachineData!C:C,"<="&$O$15+0.999988)
On the very first part of the formula I am trying to say "Count if MachineData!N:N is either like Arlington or like RenewNorfolk" but for some reason that specific part of the formula is giving me problems. Can someone help me figure out what the issue is with my syntax? Thank you
As explained here, using the *IF(S) type of functions with arrays will make them return an array, so you need to use SUM to get one value.
I have 2 formula's that work fine in XL2010, but not in XL2003, I figured out that COUNTIFS are the problem.
Could someone help me convert them so I can use them in both versions of XL
This is one of the XL2010 codes:
=COUNTIFS(CXPATS!I:I,">="&EOMONTH(TODAY(),-4)+1,CXPATS!I:I,"<"&EOMONTH(TODAY(),-1)+1)
Below is one of my many attempts using SUMPRODUCT, but they either don't work or continually show #NUM!
=SUMPRODUCT(--(CXPATS!I:I>=EOMONTH(TODAY(),-4)+1,--(CXPATS!I:I<EOMONTH(TODAY(),-1)+1))
This is the other XL2010 code:
{=SUM(COUNTIFS(CXPATS!L:L,{"6859*","685A*"}))}
...and one of my many attempts using SUMPRODUCT again, but again I keep getting #NUM! on most attempts
=SUMPRODUCT(--(CXPATS!L:L="6859*"),--(CXPATS!L:L="685A*"))
You cannot reference whole columns using SUMPRODUCT so I used a DNR instead (shown below as DATES in the code) to get the exact range and the formula now works:
=SUMPRODUCT(--(DATES>=EOMONTH(TODAY(),-4)+1),--(DATES<EOMONTH(TODAY(),-1)+1))
I am a novice at Excel and need some help with a formula. I have a set of cells that are the sum of a formula. They are based on information from month to month. At times this can be zero. I want to average them out and am using this formula =AVERAGE(IF(F17:Q17<>0, F17:Q17,"")). That works fine. But, I want it to display 0 if there are no values other than 0, instead it shows #DIV/0! Any ideas?
a simple way is to =if(sum(F17:Q17)=0,0,average(if(F17:Q17<>0,F17:q17,""))) there's also the 'averageifs' statement you should be using to make life simpler.
the IFERROR wrapper will take care of that problem. It's am optimized version of IF(ISERROR(formula)....
Your formula would then be
=IFERRROR(AVERAGE(IF(F17:Q17<>0, F17:Q17,"")),0)
note that this will hide all errors, so make sure your formulas work as expected first, before putting the IFERROR around them.
I have created an interest rate model in excel that contains a stochastic part created by the NORMINV() command. However sometimes I get the error #NUM!. I would like to know how I can create a function that assigns a certain value to cells with the text #NUM! in them.
I have tried a IF function but it didnt work as it didnt see #NUM! as a logical outcome, e,g, IF(B3=#NUM!, "2").
Or perhaps I just missunderstood.
Thank you in advance!
Use IFERROR()
For example IFERROR(B3;"2")
I've got an issue in Excel that I can't seem to work out:
I'm using SUMPRODUCT() function to calculate a sliding-scale commission. I've got the basics of it worked out by reading this page: http://www.mcgimpsey.com/excel/variablerate.html
which states that I can work out commission as so:
=SUMPRODUCT(--(A1>$J$2:$J$5), (A1-$J$2:$J$5), $L$2:$L$5)
Where A1 would be the gross amount, J2:J5 would be a range of thresholds and L2:L5 the different rates of commission on those thresholds.
I've got the formula working on a single test case, but when I try and factor out the variables into cell references and ranges it fails and returns #VALUE!
e.g. It fails when I use the following formula:
=SUMPRODUCT(--(C17>$C7:$E7),(C17-$C7:$E7),commissionPercentages)
or
=SUMPRODUCT(--(D17>$C7:$E7),(D17-$C7:$E7), R11:R13 )
both of which refer to three adjacent cell containing percentages.
However, if I hard-code the percentages as an array constant:
=SUMPRODUCT(--(C17>$C7:$E7),(C17-$C7:$E7),{0.05,0.05,0.1})
Then it works...
It also works in my test case where all the arguments are named references:
=SUMPRODUCT(--(testRevenueAmount>thresholds),(testRevenueAmount-thresholds),commissionPercentages)
I don't understand why this is happening, and what I've done wrong.
Could anyone enlighten me?
There is a simplified version of my spreadsheet here if you would like to see what I am attempting.
http://diggory.net/Grazing/CommissionSample.xlsx
Thanks.
You can also use MMULT function to avoid "array entry", i.e.
=MMULT((C17>$C7:$E7)*(C17-$C7:$E7),commissionPercentages)
As you commented, the different orientations is the issue.
You can work around this problem by adding a Transpose to your formula
=SUMPRODUCT(--(C17>$C7:$E7),(C17-$C7:$E7),TRANSPOSE(commissionPercentages))