How to I find where a certain number would fit in a row of values in Excel? - excel

I have an array of 10 numbers in numerical order ranging from 1-100 in Excel Column B-K. In column A, I have a single number from 1-100. I want to find out where the value in column A would fit in the values from B-K.
For example, for the following 10 numbers (in descending order), the value 58 would fit in the 4th position (between 60 and 54). How would I write a formula to do this for many different values?
80 75 60 54 32 21 20 15 12 5

Related

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

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)

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 out the count of the common values in two list using excel formula?

I have lists in column A and B. There are values that are common and i want to find the count of the common values using the excel formula
A B
10 20
5 30
30 35
20 42
52 50
Here two values common are 30 and 20. So, count of common value will be 2.
The list may contain text or numeric values.
No problem, COUNTIF accepts array criteria and SUMPRODUCT will add them up for you
=SUMPRODUCT(COUNTIF(A1:A5,B1:B5))
This returns 2 with your sample data, as required

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)

Resources