Excel Formula - Column SUM where two columns match values - excel

I have a table where I need to obtain the sum of one column where the values in two other columns match specific criteria.
What I need would be the sum of the Value column where the customer name matches Customer A and the Order Status matches Complete. For this example the result would be £150.00
I am using Excel 2007.

SUMIFS is available in 2007+
first parameter is what values to sum, the subsuiquent pairs are the range and their criteria.
For your example, it would be
=SUMIFS(D:D,A:A,"Customer A",C:C,"Completed")
You could also summarize the whole table using a pivot table.

Related

sumifs in excel where the criteria is a range possible?

assume a table where one column has values T1...Tn. how would I get the sum of another column where the corresponding T value is a set?
=SUMIFS(...,Sheet1!$D$1:$D$250,{"T1","T2","T3","T4","T5"})
I tried this but it is only picking values corresponding to T1

Excel Expand formulas based on the length of the list results

I'm using the filter formula to return a list of results. The length of rows of the list is variable.
For each returned value I need to apply a new formula. I would like to know if I can extend this formula automatically all rows based on the length of the list.
A simple example: On cells A1:B100 I have a list of values. On Cell D1 I have this formula =FILTER(A2:A10;B2:B10="Filter")
The result will be a list in Colum D that can have 1 row and upto 100.
In Column E I need to have this formula D1*10. This should extend to the rows below dynamicaly based on the number of rows returned on the Filter formula
Any ideas if this can be done automatically?
What I'm doing is quite more complex than this example since I'm filtering a table that is in a different workbook that is custom data type and the number of rows will vary from about 10 to over 9.000
Use the spilled range operator # after the cell in question:
=D1#*10

Countif Based On Another Column with filter In Excel

I am trying to perform a countif, based on criteria from another column with a filter.
Goal: Count the number of times MD in Column A chose "5" in column B, despite it having a filter.
Try this:
=countifs(b:b,a:a,"MD",b:b,5)

How do I sum all entries that match a lookup table?

So I have a column of numbers I want to sum. Each number is associated with a value on a lookup table. I need to find what values I want to use to sum based on the lookup table itself.
Basically, I need to sum everything in column I based on whether the entry in column J matches a MFG in column M that matches a reference number in column O. I have tried multiple iterations of SumProduct and array formulas, and have had no luck getting it to work. Everything I've read online about summing based on multiple criteria only works if you know ahead of time how many conditions you have to match; I don't have that information.
This will iterated through the second table and if the Ref Num match the input in M16 then it returns the SUMIF() value of MFG from the first table and sums them all together:
=SUMPRODUCT((M16=$O$7:$O$12)*SUMIF(J:J,$M$7:$M$12,I:I))
Notice that the references to Table 2 are limited to the actual data, while the references to table 1 can be full column references. That has to do with how the formula will iterate. As it literally will iterate through the second table we want to limit the number of iterations to the data set itself. While the SUMIF() formula is already optimized and has no detriment to full column references.

Select a single number from a group by comparing time stamps

I have an xlsx sheet (using MS Office 2010) with around 10-15K rows and multiple columns. I want to consider two columns to filter this data but need data from all the existing columns. Sheet looks like
The id column can have duplicate records. The rule I want to apply is:
1) For the set of duplicate ids in column id, select only 1 row which has highest value in corresponding timestamp column.
2) So as result this should give only distinct ids with hisghest timestamp among it's set of duplicate values.
3) Considering the data in the sheet, the result should have only two rows that I have filled in with yellow color.
Can you please help me on how to setup rule to do this in excel?
Sort by id then timestamp (descending). Add a new column after B and use
=COUNTIF(A$2:A2,A2).
Filter that column to show only 1's
Do a descending sort on Columns A and B and then use Remove Duplicates on Column A only. The highest values should be the first found, and anything else will be deleted.
Without sorting for a Range from A2 to A24 you can use:
=B2=MAX(B$2:B$24*(A$2:A$24=A2))
If you have any questions, just ask ;)

Resources