I am having trouble working out an error I am having with the formula below, I am a bit of a novice and its been more trial and error than anything so far but, I was hoping someone with a far greater knowledge could point out where I am going wrong.
The formula works fine without the indirect element I.e.
=SUMPRODUCT((PARROT!$o$12:$o$250<>"COMPLETE")*(PARROT!$n$12:$n$250<TODAY()))
but I want to replace the sheet name with an INDIRECT address as the name of the sheet could change
so the formula I came up with is but, it has an error:
=SUMPRODUCT(INDIRECT("'"&$A3&"'!$o$12:$o$250"),"<>"&"Complete")*(INDIRECT("'"&$A3&"'!$N$12:$N$250")<TODAY())
Help would be very much appreciated.
From your formula it seems you are just counting rows where O12:O250 is not equal Complete and N12:N250 is earlier than today. So, you can use COUNTIFS() formula with INDIRECT() easily. Try below.
=COUNTIFS(INDIRECT($A$3&"!$O$12:$O$250"),"<>Complete",INDIRECT($A$3&"!$N$12:$N$250"),"<"&TODAY())
If you need to sum values from a column then SUMIFS() will be your friend.
I need help in my formula, I'm getting #VALUE!.
I have 2 sheets, I need to get the data using 2 values, So I've searched and the solution is to use the INDEX and MATCH Function. I've tried that in my formula but I think I'm doing it wrong.
I have 3 columns in my Main Sheet,
In the column Total Amount I need to insert the formula.
And this is my 2nd sheet. 3 columns also.
And this is the formula that I've used,
=INDEX(Q9:Q13,MATCH(O19&P19,O9:O13&P9:P13,0))
I've tried to check using evaluate formula and I'm getting #Value! I don't know why.
Any Ideas?
Thanks!
I think SUMIF() would be best fit for you in this case. Try below formula.
=SUMIFS(Sheet2!$Q$8:$Q$13,Sheet2!$O$8:$O$13,A1,Sheet2!$P$8:$P$13,B2)
You can also use SUMPRODUCT() like below.
=SUMPRODUCT((Sheet2!$Q$8:$Q$12)*(Sheet2!$O$8:$O$12=A2)*(Sheet2!$P$8:$P$12=B2))
I have a list of surfaces with a certain type, and I need the total of each type. I tried with VLOOKUP function but it only gives me the first result. I tried with this answer on another question, but it's too complex to get it working for me.
in cell H4 I have this function:
=VLOOKUP(G4;$D$2:$E$11;2;FALSE)
Thanks for your time.
You need SUMIF formula and not VLOOKUP like below.
=SUMIF($D$2:$D$11;G4;$E$2:$E$11)
Copy down.
I am trying to build a rank formula that ignores errors.
I've tried:
=Rank(BN4,(if(iserror(BQ4:BQ31),"",BQ4:BQ31)))
I've also Tried:
=IF(ISERROR($BQ$4:$BQ$31),"",1+SUMPRODUCT($BP$4:$BP$31=BP4,$BQ$4:$BQ$31>BQ4))
Is There something wrong with the formula? Is there a better way? See image below, the rank formula appears in Col BN. Thanks!
]1
Given the spreadsheet below:
You can use the following formula on C2 and drag it:
=IF(ISERR(A2),"",COUNTIF($A$2:$A$7,">"&A2)+1)
I think this is what's going on: in your second formula, your Sumproduct is still calculated with the errors. Although the first part your formula tells Excel to return a Blank when calculating the rank of an ERROR, the errors are stil inputted into second part where you actually calculate the rank, and thus Excel will spit out an Error even if it's calculating the rank of a regular number
The formula provided by Lucas above is probably the simplest way. If you must use sumproduct, you should include something in your sumproduct that tells excel to use a blank value if it comes across an error when calculating the some product.
For example, if you're trying to do the sumproduct of A1:A4 and B1:4 but the both ranges have some errors, then you'd use:
=SUMPRODUCT(IF(ISNA(A1:A4),0,A1:A4),IF(ISNA(B1:B4),0,B1:B4))
Ok. So i'm looking to nest IF in my SUMIFS formulas. The only problem i'm having is when one of my referenced cells show FALSE, the formula no longer works. How do i get the formula to completely remove that Criteria from the SUMIFS formula and still work?
Codes i've used.
=SUMIFS(R:R,IF(BE4=TRUE,I:I),IF(BE4=TRUE,BD4),J:J,BD5)
=IF(BE4=TRUE,SUMIFS(R:R,I:I,BD4),0)+IF(BE5=TRUE,SUMIFS(R:R,J:J,BD5),0)
I've even tried breaking the SUMIFS formula into multiple cells, and using IF and INDIRECT to create a working code. Just keeps popping up with #REF error.
Here's that code
=INDIRECT(CONCATENATE(BK1,IF(BE2=TRUE,BK2,""),IF(BE3=TRUE,BK3,""),IF(BE4=TRUE,BK4,""),IF(BE5=TRUE,BK5,""),BK6))
Here's the code that didn't work before the IF.
=INDIRECT(CONCATENATE(BK1,BK2,BK3,BK4,BK5,BK6))
Any help would be greatly appreciated.
Thank you
Mock Sheet
https://www.dropbox.com/s/tl64vbsalcqxqdm/CriteriaIFS.xlsx?dl=0
Try this formula:
=SUMIFS(BK1:BK6,BK1:BK6,">=0")
Please try this formula,
=IF(BE4=TRUE,SUMIFS(R:R,I:I,BD4,J:J,BD5),SUMIFS(R:R,J:J,BD5))
Your formula
=SUMIFS(R:R,IF(BE4=TRUE,I:I),IF(BE4=TRUE,BD4),J:J,BD5)
You are saying:
Sum from column R everything if match in J with BD5 and IF BE4 is TRUE THEN in I IF match with BD5. Well, the error is because, if BE4 is true is returning a string not a range. Instead you could use this:
=SUMIFS(R:R,INDIRECT(IF(BE4=TRUE,I:I)),INDIRECT(IF(BE4=TRUE,BD4)),J:J,BD5)
And it will be ok, until BE4 is FALSE. because the INDIRECT function return an #REF!... and will be a mess.
I'm not sure if I get the whole idea, but please tell me if you need an emprovement.
Edit #1
Reading your comments I think this could help:
=IF(BE4=TRUE,SUMIFS(R:R,I:I,BD4),0)+IF(BE4=TRUE,SUMIFS(R:R,J:J,BD5))
Try to post some dummie database (using text table format) to give you a better help... and remember to read this: How to ask because your question is to vague, and it was necesary to many comments and answers to "guess" what you really want.
Try this array formula:
=SUMIFS(N:N,IF($A$2,E:E,T:T),IF($A$2,$C$2,""),IF($A$3,F:F,T:T),IF($A$3,$C$3,""),IF($A$4,H:H,T:T),IF($A$4,$C$4,""),IF($A$5,I:I,T:T),IF($A$5,$C$5,""))
It is an array formula and must be confirmed with Ctrl-Shift-Enter.
This is based on your data sheet provided. You will need to change the references to your sheet. The column T reference should be a column that is empty.
I needed to do the same thing. The formula needed to look at a different column as Criteria_Range2 depending on product. I put an IF statement for both the Criteria_Range2, and for the Criteria2 because each column had slightly different information. Basically, it tells the formula use column C (in another worksheet) as the Criteria_Range2 if the product category is anything other than Ceilings. If it is Ceilings, it uses column A as Criteria_Range2. On my worksheet, Column A is a "helper column" that groups our Ceilings sub-products into Tile and Grid.
Hopefully this isn't too confusing, but it works for me and I didn't easily find anything else out there showing how to use IF statements in the Criteria Ranges in the SUMIFS. (I suggest ignoring the very ugly xlookup defining the sum_range.)
SUMIFS(XLOOKUP($AF$20&"COGS CM MTD",Fact_Sales!$E$6:$CS$6&Fact_Sales!$E$7:$CS$7,Fact_Sales!$E$8:$CS$928),Fact_Sales!$B$8:$B$928,'Report Draft'!$AE27,IF('Report Draft'!$AD27<>"CEILINGS",Fact_Sales!$C$8:$C$928,Fact_Sales!$A$8:$A$928),IF('Report Draft'!$AD27<>"CEILINGS",'Report Draft'!$AD27,'Report Draft'!$AF27))