Find out the count of the common values in two list using excel formula? - excel

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

Related

Sum two rows in Excel based on multiple criteria

I'd like to sum the lpqty and receivedqty columns for every two rows in Excel, and I'm struggling to find a way to do it. I want a list of the first 4 columns, where the week values only appear once, not twice as it is right now. (Ignore the iog column). So essentially I want it to look something like this:
2018 9 35 BCN1 59380 109963
2018 9 36 BCN1 356071 724178
I've tried with some SUM and OFFSET formulas, but I can't seem to make it work.
For the first 4 columns:
=INDEX(A:A,(ROW()*2-2))
starting in (say) J2
Then for the next 2 columns:
=INDEX(F:F,(ROW()*2-2))+INDEX(F:F,(ROW()*2-1))
(assumes all rows are strictly in pairs)

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")

Count the number of duplicates between rows excel

I’m wondering if someone can tell me how to count the number of duplicates that occur between 2 rows in excel? I’ve read lots of posts about counting duplicates in general, but it’s not quite what I’m looking for.
In the below example, I want to indicate how many numbers are repeated from the previous row. For example, Row 1 has 3 numbers repeating from Row 2. Row 2 has 1 number repeating from Row 3. Row 3 has 2 numbers repeating from Row 4. I don’t need to know what numbers or how many times each number was repeated, I just need to know how many occurrences of duplicates there are. Each number would be in its own cell. Is this even possible?
Row 1> 20 22 40 41 42 47
Row 2> 3 37 40 41 47 49
Row 3> 1 2 3 4 5 6
Row 4> 2 5 17 20 25 30
Use COUNTIF() wrapped in a SUM() as an array formula:
=SUM(COUNTIF(A2:F2,A1:F1))
Being an array formula it needs to be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode. If done correctly Excel will put {} around the formula.
Put the formula in the first desired output cell, Hit Ctrl-Shift-Enter. Then copy down.

How to I find where a certain number would fit in a row of values in 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

Excel Function to sum values from table based on a comma separated list

I am trying to find a function that will look at a table and sum all the values where the string appears in my comma separated list. I can get sumproduct to work if my list is separated into different cells, but I need the list to be in one cell. Here is what I'm looking for:
List in Cell A1: 2000,2100,2300
Table: A10:B16
A B
2000 20
2100 25
2200 32
2300 65
2400 72
2500 12
2600 2
I'm looking for a result of: 110
Any help would be appreciated.
Thanks!
I am assuming that you can use another column but not for your list?
If so you can use the formula below in column C
=IF(ISERROR(FIND(A2,$A$1,1))=FALSE,TRUE,FALSE) with A2 being the 1st cell in which the data is contained.
This is searching through your comma separated list and evaluating against the data in column B whether it exists in the list, if so then returns true if not false.
Now you can use the SUMIF function to return those matching true in your new column C.
=SUMIF(C2:C8,TRUE,B2:B8)
If having the evaluation column C is a problem for other users you could always hide it

Resources