How to write a multiple criteria index-match that averages all occurrences of results - excel

I am trying to find the average of all occurrences in column C based on an index-match search of column A and B.
Here is the example data:
A B C
1 10 85
1 10 80
2 20 83
2 20 75
Currently, my function is this
=AVERAGE(INDEX(C2:C5,MATCH(1&10,A2:A5&B2:B5,0)))
This produces the value 85. I would like to take the average of both 85 and 80.
Thank you!

Looks like typically a case for AVERAGEIFS(), average a specific column with certain criteria in other columns e.g. your 1 in column A and 10 in column B.
So try:
=AVERAGEIFS(C1:C5,A1:A5,1,B1:B5,10)

Related

Excel Index Match Sumifs

I have a table of data where column headers are account numbers, and I'm trying to sum all data for a specified account when one column (left hand column) equals a certain number.
724| 453 | 345
1 90 0 2
2 91 1 3
3 80 5 4
So would like a formula that would sum account 453, or 345 if values in first column are less than 2. I've written an index/match function to find the column for a specified fund. But can't seem to add in the sumif or sumifs to help sum. if there is a better way, please help.

Combining Data from two columns in excel, alternate rows

I have two columns A and B
**A**
30
40
50
60
70
**B**
90
80
10
20
I am struggling to find a formula that will allow me to combine the two columns by taking first value of column A followed by two values of column B and so on:
Combined Column "C" Example:
**C**
30
90
80
40
10
20
and so on.
What can I do? Thanks
If your data starts from row 1, you can type the following formula in column C:
=IF(MOD(ROW(),3)=1,INDIRECT("A"&TEXT(ROUNDUP(ROW()/3,0),"0")),IF(MOD(ROW(),3)=2,INDIRECT("B"&TEXT(ROUNDUP(ROW()/3,0)*2-1,"0")),INDIRECT("B"&TEXT(ROUNDUP(ROW()/3,0)*2,"0"))))
If the data starts from row 2, then the formula is:
=IF(MOD(ROW(),3)=2,INDIRECT("A"&TEXT(ROUNDUP(ROW()/3,0)+1,"0")),IF(MOD(ROW(),3)=0,INDIRECT("B"&TEXT(ROUNDUP(ROW()/3,0)*2,"0")),INDIRECT("B"&TEXT(ROUNDUP(ROW()/3,0)*2-1,"0"))))

Excel: How to not count a particular cell on condition?

I need to calculate a column having many cells but I want to not calculate particular cells on condition. For example:
Scenario:
Sr No Marks
1 46
2 33
3 44
4 32
5 11
6 99
7 27
8 98
I want to get the sum of marks but only those cells should be added whom marks are more than 50. What formula should use?
We can use SUMIF here:
=SUMIF(B2:B9, ">50")
This assumes that your Marks column is in column B, and that the first data point is on the second row.
Edit:
If you want to take the average value of marks, where the mark is over 50, then we can also use COUNTIF:
=SUMIF(B2:B9, ">50") / COUNTIF(B2:B9, ">50")

Find max value from multiple columns and return cell value from adjacent column - Excel

I need help finding a way in excel to identify the max value from multiple columns and return the value in the adjacent column.
Using the table below as an example, let's say I want to simultaneously search columns A and C for the max value (89). Once the max value is identified, I would like excel to return the value in the adjacent column and cell (6) to column E. In reality, I need to find the max and adjacent value from eight columns.
A B C D E
1 65 8 36 15 6
2 24 17 89 6
3 11 20 58 13
4 42 5 29 11
I would greatly appreciate your help.
Thanks,
If the max number does not duplicate you can safely use this formula:
=INDEX($A:$D,AGGREGATE(15,6,ROW($A$1:$D$4)/((MOD(COLUMN(A1:D4),2)=1)*($A$1:$D$4=AGGREGATE(14,6,$A$1:$D$4/(MOD(COLUMN(A1:D4),2)=1),1))),1),AGGREGATE(15,6,COLUMN($A$1:$D$4)/((MOD(COLUMN(A1:D4),2)=1)*($A$1:$D$4=AGGREGATE(14,6,$A$1:$D$4/(MOD(COLUMN(A1:D4),2)=1),1))),1)+1)

Take the group average

I've two columns: A and B; for each 3 rows in A column, I want to take the average of that 3 rows and write to B. here is the example:
A B
10 20
20 50
30
40
50
60
I need the excel formula of this calculation. Thanks in advance
Suppose your data in column A are in range A1:A100, then use following formula, say in B1:
=AVERAGE(INDEX($A$1:$A$100,3*(ROW()-ROW($B$1))+1):INDEX($A$1:$A$100,3*(ROW()-ROW($B$1)+1)))
and drag it down

Resources