Really simple Excel SUMIF not working - excel

I'm trying to calculate the total from D2 to D17 only if the cells between C2 to C17 contain the number "9". I tried to use the formula =SUMIF(C2:C17,9,D2:D17), but it wouldn't work!
The odd part is that if I put in another criteria such as "4" or 50", it would return the sum. It just doesn't work with some numbers.
Here's a screenshot of the
SUMIF if I put 9 as my criteria
Thank you for any help

Look like the formula is fine, but you are summing the value "0" to the highlighted cell containing the formula, because D17 = 0, and that cell corresponds the "9" value - so the sum you get is, as expected, 0.

Related

Sum divided series

I wanna ask you. I have value which I want divide and sum. I will give you example:
Which I want series sum
A1 Value 5 B1
A3 Count 4 B3
10,41666667 **B5**
=SUM(B1;B1/2;B1/3;B1/4)
I want when I change count value formula will calculate automaticaly as formula "=SUM(B1;B1/2;B1/3;B1/4)"
Count value continues up to n, formula should work even if count value 1000.
Please help. I hope so I could explain.
Try this formula
Formula used in cell B5
=SUM(B1/ROW(INDIRECT("1:"&$B$3)))
Or you can use SUMPRODUCT Function as well, to avoid the CTRL+SHIFT+ENTER
Formula used in cell D5
=SUMPRODUCT(D1/ROW(INDIRECT("1:"&$D$3)))

Excel FILTER & COUNTIF

Currently, the formula in cell F7 is: =FILTER(C3:C7, COUNTIF($F$3:$F$4, $B$3:$B$7))
However, that formula can only return "Pen" and "Paper". But now I would like it to be when cell G3 is "Price" then 5 and 2 will be returned; if cell G3 is "Item" then "Pen" and "Paper" will be returned
May I know how should I modify the formula in cell F7?
You can have a look at the screenshot attached below to understand my question better. Thanks in advance.
=FILTER(FILTER($B$3:$D$7,$B$2:$D$2=$G$3),COUNTIF($F$3:$F$4, $B$3:$B$7))
It first filters the range to where the column header equals the value in G3, then it filters that column with your countif results.

Is there a way to find out the values ​of 4 cells are the same or different in MS Excel

I found something confusing in Microsoft Excel.
I fill Cell A1, A2, A3, A4 with the same number 1,
then I enter the formula = A1 = A2 = A3 = A4 on cell A5,
why do I get FALSE results?
Is there a way to find out the values ​​of 4 cells are the same or different?
If all you are using is these numbers you could check for the standard deviation. If it's 0 then all values are equal:
=STDEV.P(A1:A4)
So a check for equality could look like:
=IF(STDEV.P(A1:A4),"Different","Equal)
You can compare the range with the first cell, include it in the AND function and enter it as an array formula.
It will process both text and numeric values.
=AND(A1:A4=A1)
Array formula after editing is confirmed by pressing ctrl + shift + enter
You can use COUNTIF.
This is how it works in this example:
The COUNTIF returns a count of any cells that do not contain "1" which is compared to zero. If the count is zero, the formula returns TRUE. If the count is anything but zero, the formula returns FALSE.
You can apply that to any value you want to compare. Just place it before the "<>" in the formula.
This also works for "strings".

Average Formula error

I am trying to work with an average formula, that includes a few other average formulas within.
The results of my formula are either a numerical value, or 'FALSE'.
When I highlight the 8 values I get the correct average calculationin the example below result is -2.5. and when I use =AVERAGE(A2,A3,A4......A9) I get correct result as -2.5.
However, when I replace A2 within the Average formula with the formula within cell A2, I get a different result.
appreciate any help on this
The upper formula calculates average of -3 and -2 as it includes only the numbers.
The lower formula calculates average of -3, -2 and 0, as the formula that's included in it has a result of FALSE, which is equivalent of 0.
This might be easier to understand with an example.
There's 6 in cell B1, and simple ISBLANK() formula in the rest of the column.
B12 Formula: =AVERAGE(B1:B10)
C12 Formula: =AVERAGE(6;ISBLANK(B2);ISBLANK(B3);ISBLANK(B4);ISBLANK(B5);ISBLANK(B6);ISBLANK(B7);ISBLANK(B8);ISBLANK(B9);ISBLANK(B10))
First formula sees only the number 6 and ignores anything that looks like a text, second formula gets the value of FALSE ("0") before it becomes text and counts with it in the average.

Excel rounding down to a specific number

I need a help with Excel. Can't figure out the formula for a number to round down to 10010.
There is a column which calculates numbers and I want when the result is over 10010, to round it down and display it. Else to show 0.
Thanks!
if you would like to change the number (cell A1) to 10010 if it is greater than or equal to 10010, and if it is blank or less than 10010 set it to 0 this formula would work for you.
=IF(A1>=10010,10010,0)
In response to your comment if in cell B1 you put the formula:
=MIN(IF(A1:A20>10010,A1:A20))
...and make sure you press CTRL-SHIFT-ENTER instead of just ENTER when coming out of formula. This will turn it into an array formula and will return you next largest value to 10010 from you range A1:A20.
In cell C1 can then just put:
=B1-10010
Hope this helps.

Resources