SUMIF - range and value on different rows - excel

I'm trying to write a SUMIF formula based on checking to see if a specific value is present on the row above but spread across different rows as in the image below.
Any help appreciated

You need to use something like =sumif(B3:F3,H2,B4:F4)
=sumif(range of group1 headings,cell to the left of total hours,range of group1 numbers)
your question is not too clear but you may be trying to sum all the groups together at once which you can't do with a single sumif but you can add 3 sumif funtions together in the same formula.
=sumif(B3:F3,H2,B4:F4)+sumif(B6:F6,H2,B6:F6)+sumif(B9:F9,H2,B9:F9)

Related

sumif range over mulitple columns

I have the below table in excel
And I want to add a overall line total in for all w/c columns that have a invoice number in the column next to it.
For example I have used =sumif(B2,">0",A2) to bring back the total for w/c 1st but how can i add all values together across the multiple columns - essentially trying to do a sumif multiple range (if that is possible) to get the same result as the below example:
Any help or alternative method to achieve this much appreciated.
You could try:
Formula in I2:
=SUMPRODUCT((ISODD(COLUMN(A2:G2)))*(B2:H2<>"")*A2:G2)

Combining COUNTIFS with a VLOOKUP

I have looked through other posts on here and cannot find the solution I need.
I am currently using this formula:
=COUNTIFS(Tracking!$F$3:$XA$3,$F1,Tracking!$F4:$XA4,"~*")
This is counting all the * values that match to the reference "Attainment" (This is cell F1), but is relying on my 2 worksheets to have the people listed in exactly the same order. What I really want is the countif to calculate based on matching the person ID.
I have 2 sheets that use a unique ID for each person. I want to be able to match this ID and then run the countif, so in essence combine a VLOOKUP with the COUNTIFS. I did try adding another criteraia to the COUNTIFS but this doesn't seem to work. No IDs are repeated in either sheet. The unique ID defines each row and the row holds a very large amount of grade data for the person.
Sample Data
I think you could accomplish this using this formula in F3
=COUNTIF(INDIRECT("Tracking!"&MATCH(A3,Tracking!$A:$A,0)&":"&MATCH(A3,Tracking!$A:$A,0)),"*~*")
This is using the row number of the match to COUNTIFS any cells with a * in that row.

Returning sum of column for filtered data, without filter

I'm trying to calculate the sum of a column (TSQFT in the screenshot) that is part of a data set, which would be filtered based on multiple criteria using cell references (see screenshot). I don't want to use excel's regular filter as it's a hassle to change the settings and I'd like it to be done in a more automated way.
I've tried {SUMIF} and {SUMIFS} but those do not work as a filter - i.e. for a row to be {TRUE}, the numbers have to be in the same order as that specified in the criteria list {5-7-2} (see screenshot).
Would much appreciate any help.
You can try something like this:
Make 3 column of =IF(OR(C3=$C$10;C3=$D$10;C3=$E$10);1;0) formulas, one more column for a sum of this 3 column and a sumif based of the sum values
if the sum is 3 then the value is good.
This maybe the worst solution for this but as long as it can help, it can be developed into something better.

Excel - How to locate and sum adjacent cells and over multiple columns based on criteria of other columns cells

Formula to add all occurrences where a name pops up in a column (multiple columns) and return the summed value of all adjacent cells. For more clarification see
Example Attached
In this circumstance I want it to find all of Jim's adding to 5, all of George adding to 4, and all of Terry adding to 7. The challenge is each column will have the names randomly assorted and some times the name may not show up for that day.
Is it possible to search all days for the month (for this example) and add the total of the adjacent column for each person if I input their name?
I was looking into SUMIF functions but I can only get that to work if its all in 2 columns, with the way this one is approached I can only work through multiple columns.
Thank you for any assistance!
Use SUMIF, You will need to provide the list of names:
=SUMIF(Y:AC,"Jim",Z:AD)
Note the offset but same size ranges. Also change "Jim" to a cell that contains the name you want to sum.

Sorting formulas issue

I have a table which consists of names (1st column) avarageifs (2-6 columns) and average formulas (7 column).
Averageifs formula is taking the name to average values for each name:
=IFERROR(AVERAGEIFS(Grades!B:B,Grades!$A:$A,Rankings!$B14),"N/A")
"Total" average formula is:
=IFERROR(AVERAGE(C14:G14),0)
Then I am trying to sort it by "total" average, formulas are mixing up and referring to different rows.
But it should refer to the same row. What happens after sorting and how can I fix it?
Basically the references in the AVERAGEIFS formulae are getting swapped around and you don't want this to happen.
The easiest way round it would be to put the Totals column next to the Names column and just sort these two columns, leaving the other formulae in place.
If you don't want to do that, a fairly quick and dirty solution is to replace the AVERAGEIFS formulae with this so they always refer to the current row:-
=IFERROR(AVERAGEIFS(Grades!B:B,Grades!A:A,INDIRECT("Rankings!$B"&ROW())),"N/A")
See the discussion here

Resources