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.
Related
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 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))
I have been working on this formula for the last 40 minutes and I can't really figure out where I'm doing wrong. I would really appreciate the community's help.
I have provided a screen shot below.
For some reason the formula is only taking the first instance of the currency provided in "column O:O" and it is not adding up the multiple instances of the matching months and year. I tried putting SUM in the formula but I got an error.
INDEX/MATCH And VLOOKUP will only return the first instance.
You will need to use SUMPRODUCT() to return what you want:
=SUMPRODUCT((MONTH(D17)=MONTH($M$2:$M$6))*(YEAR(D17)=YEAR($M$2:$M$6)),$O$2:$O$6)
Note: SUMPRODUCT is an Array Type formula an thus the cell references should include only those that have data and avoid full column data.
I know is a pretty basic question, but surprisingly, I can't seem to find a solution for it.
I'm looking to averageif every 10th cell that doesn't contain a 0 value, but for some reason the syntax doesn't work. I can't just take a range from between the first and last cell because there are other values in between that I don't want to be part of the average. I would have expected something like the below to work just fine, but it keeps returning an error message.
=AVERAGEIF(C4+C14+C24+C34+C44+C44,"<>0")
Any ideas? Thanks a bunch.
I've figured out a solution to my question (in case anyone comes across this in the future).
Instead of using AVERAGEIF, you can use a combination of the SUM and FREQUENCY functions.
To find the average of these cells [C4+C14+C24+C34+C44+C44] but exclude all 0 values, it looks like this:
=SUM(C4+C14+C24+C34+C44+54)/INDEX(FREQUENCY((C4+C14+C24+C34+C44+C54),0),2)
Credit to this blog for the help: http://colinlegg.wordpress.com/2013/05/04/conditional-average-on-non-contiguous-ranges-using-frequency/
I would use a "helper column"
In B1 enter:
=INDIRECT("C" & 4+10*(ROW()-1))
copy B1 to B2 thru B6
Then use:
=AVERAGEIF(B1:B6,"<>0")