Excel difference SUMIF and total SUM (14th digit differs) - excel-formula

I'm encountering a strange error in Excel.
I have 5 cells doing a SUM IF.
A 6th cell who gives the total of the 5 SUM IF cells.
A conditional format to compare the value in the 6th cells with the total SUM directly in the table (same table as for SUM IF) - If SUM is different from this value then "RED"
On first sight, the values seem the same, but the conditional format is saying that there is a difference.
After checking I can see that the 14th digit differs and that, because of that, it is marked as a difference.
I have no idea on how to solve this. Is Excel somewhere rounding automatically in the SUM IF function?

You left out a lot of information but my wild guess is that you might have missed absolute referencing.
If I assume that your data is in columns A and B you your aggregation is in columns D and E this is what your formula in D2 should look like:
=SUMIF(A:A,D2,B:B)
or
=SUMIF($A$1:$A$13,D2,$B$1:$B$13)
As for the conditional, assuming your sums are in E7 and F7, I hope you use:
=$E$7<>$F$7

Related

EXCEL: Auto number rows until value in cell

This is probably very easy, but I can't seem to get it to work.
I'd like a formula for autonumbering rows based on the value in B1.
Starting from B1 id like to autonumber rows from 1 and down until the value defined in B1.
This need to be a formula, and not VBA beacuse of other technical obstacles cannot solve.
I manage until I reach the defined value (blank) is returned, and the next row returns #VALUE because the calculation fails.
I have tried all the IF, IFS, <>"", <=, >=, AND, OR combinations I can think of.
How can I define this and avoid the #VALUE error.
The defined value in B1 will be a value ranging from 6 to 48
Would really appreciate help on this.
If you have Excel 365 you can use SEQUENCE:
Put =SEQUENCE(B1,1,1,1) in the cell below Month
The values will spill down - that means there have to be enough empty cells below the formula cell
This will create a numbered sequence --> number of rows is set via value in B1, one column, starting at 1

Filtering a column in a formula and correcting formula

Two part question.
I have a formula in excel that currently doesn't work, and so I want to correct this formula and then apply it to a subset of rows that I want to be able to select within a formula.
Here is a screenshot of what I am working with:
Part 1:
So the result is being calculated in cell G3. I would have expected the value to return the value 5 and not 6 as what I expect the calculation to do is the following:
1) Look in column C and find which rows are less than the threshold value in cell G3.
2) Of those rows that meet that criteria, return the values that are in column B.
3) Take the max value of those returned values which is 5.
Am I missing something here?
Part 2:
Second part of the question is that I would like to be able to apply the "correct" formula in Part 1 to a subset of rows based on the the ID's in columns A. Basically I would like to take the unique ID in cell E3 and then apply my corrected formula to all of the rows where the values in column A matches E3. This one I cannot seem to find a formula for to do.
This excel doc is going to become a general tool and so I don't want to have to select rows manually and so would like to be able to do all of the matching without selecting thins manually.
Since you have a recent version of Excel, you can use MAXIFS:
=MAXIFS(B3:B10,A3:A10,E3,C3:C10,"<=" & F3)
FYI, based on your description, 6 is the correct return value.

Excel - Writing proper SUM formula

I am supposed to sum up the total highlighted numbers and add the sum in the red marked cell beside the average number. I am using a basic SUM formula to add the cells. I have a couple thousand lines to do this with and I have to manually change the SUM formula to include the right ranges (as some have 4 numbers to add up, some have 3 and others have 2). Is there a way to write the formula so it SUMS all the numbers up until the Average line above it? So I can use the same formula throughout my sheet and not have to change it for every line?
No need for Array formulas.
I will assume you are starting in H2. As per your photo in the discussion
=IF(E2 = "Average",SUMIF($E$1:E1,"<>Average",$G$1:G1)-SUM($H$1:H1),"")
And copy down.
You could use a variable range within a SUM function, using INDEX and MATCH to find the previous instance of Average.
Something like this - an array formula, so enter with Ctrl+Shift+Enter:
=SUM(B3:INDEX(B$1:B3,IFERROR(MATCH(2,1/(A$1:A3="Average")),0)+1))

SUMPRODUCT Circular error

I'm having trouble with a simple excel formula. Here is a basic example :
I'm trying to sum all cells in B4:C7 when column A is not equal to B. If I set this formula in D1 for example this works well.
However If the formula is within the range B4:C7 on a line where column A is equal to B I get a circular error. The problem is there is no way my formula takes its own cell as it is on a line which colA = B. Excel calculates 0 as a result.
I know this example look silly. In my real problem all lines with A in col A won't execute the sumproduct because of various If conditions.
UPDATE
Here is a more precise example. The second tab displays what is correct. The formula is the same except for the ranges of the sumproduct that start from the line under the current one.
The formula is checking if some actual data was realized on the following month so as to start amortizing the budget after the last realized month.

Advanced Excel: Sum of relative cells of a category

I’m a designer. I have a list of tasks, with hours, and I’ve split them into milestones. I want to count the number of hours for each milestone.
Here’s a picture:
In other words: I want to look at the value in the M column, if it’s 1, I want to get the cell across it, then repeat down the rows, and sum the whole lot.
See if you can figure that one out with the least cell wastage! :) (This is Numbers for Mac, so no macros or vbscript or what-have-you.)
In Excel the SUMIF formula can be used.
Assumption: In picture above, the 'Hours' label is in cell A1
The formula for 'Milestone 1' in cell E2 would be:
=SUMIF($C2:$C11,RIGHT(E1,1),$A2:$A11)
The syntax of the formula is:
=SUMIF(range, criteria, sum range)
The criteria is determined by using the last character in the 'Milestone' heading.

Resources