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)
I have tried 2 approaches to my problem and can't quite figure out where I'm going wrong.
=AVERAGEIFS(CALC!L:L,CALC!C:C,Consignee!A2,CALC!K:K,CALC!A:A) and =IF(AND(Consignee!A2=CALC!C:C,CALC!K:K=CALC!A:A),AVERAGE(CALC!L:L),0)
Basically I need to start with CONSIGNEE!A2, then find it's match in CALC!C:C, which I then need to check against CALC!A:A to find the ones that go with it in the same row and see if that/those cell(s) match any in CALC!K:K and then take the average of the corresponding values in CALC!L:L and average them. I hope that makes sense. I feel like I've gotten close but am missing something.
Thank you in advance for your help!
I suspect that the formula below may not be the most efficient possible but it will do the job.
=SUMPRODUCT((CALC!A:A=CALC!K:K)*(CALC!C:C=CONSIGNEE!A2),CALC!L:L)/SUMPRODUCT((CALC!A:A=CALC!K:K)*(CALC!C:C=CONSIGNEE!A2))
Edit
In my original answer a reference to L1 was erroneously left over from the formula I tested where I had L1 taking the place of CONSIGNEE!A2. I have corrected this error and believe that the formula works fine for your requirement now.
Note that there are two separate SUMPRODUCT functions which you can test each by itself, one returning the count, the other the sum. If the count = 0 a #DIV/0 error will occur. You can prevent that by embedding the formula in and IFERROR() function.
I've been reading a bunch of answers around nesting if/then statements in Excel but I can't figure out how to fix a "formula parse error" in mine. From what I can tell and in my code editor the formula is correct. Any ideas what I'm missing here?
I have a row of cells that auto-generate a number 1-35 based on other values. I want the cell with the formula to pull data from another row based on what's the in row of numbers 1-35. It works when I test one at a time; it's the nesting that is causing the errors. Thanks!
=IF(E$167=1,C56,IF(E$167=2,D56,IF(E$167=3,E56,IF(E$167=4,F56,IF(E$167=5,G56,IF(E$167=6,H56,IF(E$167=7,I56,IF(E$167=8,J56,IF(E$167=9,K56,IF(E$167=10,L56,IF(E$167=11,M56,IF(E$167=12,N56,IF(E$167=13,O56,IF(E$167=14,P56,IF(E$167=15,Q56,IF(E$167=16,R56,IF(E$167=17,S56,IF(E$167=18,T56,IF(E$167=19,U56,IF(E$167=20,V56,IF(E$167=21,W56,IF(E$167=22,X56,IF(E$167=23,Y56,IF(E$167=24,Z56,IF(E$167=25,AA56,IF(E$167=26,AB56,IF(E$167=27,AC56,IF(E$167=28,AD56,IF(E$167=29,AE56,IF(E$167=30,AF56,IF(E$167=31,AG56,IF(E$167=32,AH56,IF(E$167=33,AI56,IF(E$167=34,AJ56,IF(E$167=35,AK56,””)))))))))))))))))))))))))))))))))))
You might have run into a function nesting limit. Try the choose function to work around it.
How about using
=IF(AND(E167>0,E167<36),OFFSET(B56,0,E167),"")
Note : OFFSET is a volatile function, see this for details.
A simple vlookup or hlookup function can do exactly what you need without righting long nested if statement.
for example you can use:
=vlookup(E$167,$A1:$B35,2,false) where $A1:$B35 is the table array containing column A (1-35) and column B its corresponding value.
Hi I am trying to write a formula where if cell (J$4) = 1120 then it would run one statement, whereas if cell (J$4) = 1120s it would run another. I am using index-match to lookup the appropriate value. However, I can't seem to get my formula to work and I was wondering if you guys can find my error. The error is 'you've entered too many arguments for this function'. Any help would be appreciated! Thank you!
formula:
=IFERROR(IF(J$4="1120S",INDEX(B1HY3!$A$3:$F$300,MATCH("L 22a",B1HY3!$F$3:$F$300,0),5),IF(J$4=1120,INDEX(B1HY3!$A$3:$f$300,MATCH("L 22a",B1HY3!$f$3:$f$300,0),5)+INDEX(B1HY3!$A$3:$F$300,MATCH("L 22b",B1HY3!$F$3:$F$300,0),5),0),0)
Always try to follow parentheses' colors it is quite useful when handling with large formulas,furthermore try always to evaluate your formulas to check where the error is.
It worked for me:
=IFERROR(IF(J$4="1120S",INDEX(B1HY3!$A$3:$F$300,MATCH("L 22a",B1HY3!$F$3:$F$300,0),5),IF(J$4=1120,INDEX(B1HY3!$A$3:$F$300,MATCH("L 22a",B1HY3!$F$3:$F$300,0),5)+INDEX(B1HY3!$A$3:$F$300,MATCH("L 22b",B1HY3!$F$3:$F$300,0),5))),0)
It was nessesary to close the parenthesis of the second if
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")