Hi all, I have a problem with a formula with SUMIFS and INDIRECT.
I want to sum up the lines in the D column that does not have the "AL" in the B column.
The number of lines between the sum of the row where the formula is and D6 will increase and vary.
I get the error #VALUE!
The formula is:
=SUMIFS(D6:INDIRECT("R[-1]C";0);B6:INDIRECT("R[-1]C";0);"<>AL")
examples of my excel worksheet layout
The line above having the formula =SUM(D6:INDIRECT("R[-1]C",0)) works great
I think that the formula should work but it doesn't.
Anyone who can figure out what is wrong with the formula?
Thanks!
/martin
In the SUMIFS function, the criteria_range needs to be in a single column. In the INDIRECT function you are using an absolute start column with a relative end column which results in multiple columns. Need to use an absolute end column. For example, change...
=SUMIFS(D6:INDIRECT("R[-1]C";0);B6:INDIRECT("R[-1]C";0);"<>AL")
to...
=SUMIFS(D6:INDIRECT("R[-1]C";0);B6:INDIRECT("R[-1]C2";0);"<>AL")
Related
I need to sum Amount for all the dates if there is value in India row:
I tried implementing with COUNTIF function but its not solving my problem, any suggestion welcome, I am pretty new to Excel formulas.
Try this.
Let's assume the top left cell on your image is cell "A1". Go to cell "C6" and paste the following formula:
=IF(C2>0,C2*(SUM(C4:C5)),"")
Now fill/copy that formula across to cell "G6". Then go to cell "H6" and paste the following formula:
=SUM(C6:G6)
Hope this helps.
What about this:
=SUMPRODUCT(C2:E2+C3:E3,C4:E4+C5:E5)
It's basically adding the two first rows, adding third and fourth rows, and taking the sumproduct. Obviously, you need to make sure not have a number in both rows one and two, and in both rows three and four.
I have been using the below formula which SUM the Sheet2 values and Present Them in Sheet3.
Now i have been trying to add one more condition that is the formula should SUM the just Negative Values from the Range Sheet2!D2:D30 When Sheet2 Col"L" cell is not empty and Paste them in Sheet3.
I have attached a Sheet link which may help to solve the problem.
Here is original formula
=SUMPRODUCT(SUMIFS(Sheet2!D2:D30,Sheet2!I2:I30,Sheet1!I2:I30)*(Sheet1!D2:D30=A3))
After i have added one more condition but its not working
=SUMPRODUCT(SUMIFS(Sheet2!D2:D30,Sheet2!I2:I30,Sheet1!I2:I30)*(Sheet1!D2:D30=A3)*(Sheet2!L2:L30<>""))
any help will be much appreciated.
Result will be like this:
Sheet Link
Link
To only sum the negative values, you can just add that as a condition in your SUMIFS:
=SUMPRODUCT(SUMIFS(Sheet2!D2:D30,Sheet2!D2:D30,"<0",Sheet2!I2:I30,Sheet1!I2:I30)*(Sheet1!D2:D30=A3))
I have an excel formula =SUM(AZ2:AZ300)
I want to make this more dynamic by using the formula =ROW(OFFSET($B$1,COUNTA($B:$B)-1,0)) in cell A1
Then I want my formula to do the following =SUM(AZ2:AZ&A1)
This formula doesn't work, but it to take the sum of cells AZ2 through AZ and the number given in cell A1
For example if A1 value is 250 then I want the formula to be equivalent to =SUM(AZ2:AZ250)
Thanks in advance for your help.
Rather than putting the row number in a separate cell you could combine it in the formula:
=SUM($A$2:INDEX($A:$A,COUNTA($B:$B)-1))
This does the same as the OFFSET version, with the bonus of not being volatile.
I'm using an array formula to calculate the second-largest value in each of Columns B-Z, conditional on the values being with a certain date range in Column A. Cells J2 and J3 contain the date ranges for IF function.
The formula I'm using is as follows:
{=LARGE(IF(($A$4:$A$4054>=$J$2)*($A$4:$A$4054<=$J$3),B4:B4054),2))}
In the majority of cases, the formula works perfectly but occasionally it is throwing up "0" as the answer - even though there's no zeroes in column D.
Is there an error with the formula? Or, alternatively, is there another formula I can use to achieve the same outcome?
Thanks in advance! :)
SUMIFS(C1:C5,A1:A5-B1:B5,">5")
Is the above formula workable in excel?
Column A and Column B contain dates
Column C contains quantity.
What I need is When Column A minus Column B greater than 5 then sum all the quantity.
I understand this is able to do with creating a new column to get the difference in date first then use the computed value inside SUMIFS formula.
However, I really try to avoid adding an extra column.
Thank you
You can use the following formula:
=SUMPRODUCT(IF((A1:A5-B1:B5)>5,C1:C5))
this is an array formula, so press ctrl+shift+enter to calculate the formula.
Hope this works for you.