Excel Multiple Values for one anwer - excel

Hello looking to solve a problem in excel. Here is an example of my data: Please see attached file.
I am looking to just grab One barcode to one value(Yes/No) for example if I wanted to see how many Yes answers there are its skewed because you can have multiple Yes/No values per barcode. which would count as 2 instead of just one value. I hope this makes sense. I tried a pivot table and everything because we need to set the barcode to a count distinct but I am lost on how to create a formula or something that would work. I cannot Remove multiple values because each line contains data I need since this is just an example.

I think you're looking for countifs. =Countifs(a:a,1,b:b,"yes")
This will only count instances where the bar code is 1 and column b is yes

You can use COUNTA with UNIQUE and FILTER formulas nested. =COUNTA(UNIQUE(FILTER(A:A,B:B="yes")))
The filter formula tells Unique to only look at rows where column B = Yes. Unique then creates an array of just unique entries. While CountA will count how many entries are in the array.
I added some extra entries to the example so it showcases it better. I colored the first instance of each unique entry blue to highlight the instances the unique formula is pulling.

Related

Identifying conflicting cells with duplicate IDs in Excel

So I have an excel table setup consisting of rows with their own IDs. Each ID should be unique but we have a lot of duplicate IDs that I'm trying to remove. So the first thing I tried to do was identify and remove the duplicates using the Conditional Formatting and Remove Duplicates tool in Excel but unfortunately I'm still left with several rows that share an ID but haven't been removed. So now I have to go into them and look through them manually. I was wondering if there was a way to have excel highlight the discrepancies between the rows. I've provided an example below.
ID
number
description
123abc
3
Three
123abc
4
Three
456def
5
Five
In this sort of table the discrepancies are 3 and 4 since they belong to the same ID but differ in value so I would want Excel to highlight them. Is this possible in Excel? Thank you.
if you want just highlight duplicate and unique cell use Conditional formating. there is a rule of duplicate filter.
In the Number column, use a Conditional Format formula rule like:
=COUNTIFS($A$2:$A$3000,A2)>=2
Assuming the ID is in column A, and you may need to change the 3000.
Sorting by the ID column would also be useful.

How do you count the occurrence of same data set in two columns-set in excel?

How can we count the occurrence of each set of data? For eg I want to check how many time the customer country in column A comes alongside country in column B ie (How many times Australia-Australia occurs in column A and column B?). The result for unique occurrences are place in right hand side of the sheet. I have found out unique occurrences of the sets and want to count how many times each occur.
You asked for a formula, but a pivot table can do the same thing faster; and without requiring you to create the table for unique countries (option found under insert, usually the first button in the ribbon):
This is how it looks like after pulling the fields in the right 'boxes', the 'Tabular' report layout is selected and the subtotals turned off.
You can make 'Australia' repeat itself too under report layout if so you wish.
Again, SUMPRODUCT is your friend:
=SUMPRODUCT(--(($A$2:$A$11&$B$2:$B$11)=(D2&E2)))
You can use COUNTIFS function as below.
=COUNTIFS(A:A,D2,B:B,E2)
Adjust the ranges to suit your data and copy down.

Excel: how to count combinations that go both ways

I need your help with Excel because I can't seem to find the answer anywhere.
So let's say I have column A and column B and in each column there are different colors. I've already created pivot table to count how many times a certain combination occurs, however, I don't know how to count the same combination of colors that occur in the reverse order as one. For examble combination 1 is red-green and combination 2 is green-red. Pivot table counts these as different entitites.
Thanks for your help in advance.
Two suggestions
(1) Keep it simple
Just set up a helper column containing each pair in alphabetical order
=IF(A2<B2,A2&"-"&B2,B2&"-"&A2)
then run a pivot table on the result.
(2) Make it complicated
List the different pairs using a formula
=IFERROR(INDEX(A$2:A$10&"-"&B$2:B$10,MATCH(1,INDEX((COUNTIF(G$1:G1,A$2:A$10&"-"&B$2:B$10)=0)*(COUNTIF(G$1:G1,B$2:B$10&"-"&A$2:A$10)=0)*(A$2:A$10&B$2:B$10<>""),0),0)),"")
Then count them
=IF(G2="","",SUMPRODUCT(COUNTIF(G2,A$2:A$10&"-"&B$2:B$10)+COUNTIF(G2,B$2:B$10&"-"&A$2:A$10)))
The second way has the advantage that it is dynamic and doesn't need helper columns.
The first way is faster and puts the results in alphabetical order.

Combine the multiple Match Values in Excel

I want to combine Multiple Match Values in Excel an illustrative picture
the example is in the picture.
I want to concat the the match values in one cell
thanks in advance
How large is your data source ?
Are you considering VBA ?
If you need something quick and dirty, one way could be to use intermediate columns that will add item if they match a given ID. For example, if you have your data in column A and B, then column C could be based on formula_in_C2 = IF(A2="v1",C1&B2,C1).
Expand the formula on the whole column. The last row will give you what you are after. Create similar columns for the other IDs.

How can I mark duplicate values in a column based on a second value in a different column in Excel 2007?

I have been trying to mark duplicates in the same excel column based on a criteria in a different column, and I would love to have some help. In reference to the example below, I would like to highlight all the rows that is a duplicate value of another row red, and put a Y in a third column ("Delete" in the example below). When the value in the Name column is a duplicate of another, disregarding case sensitivity, I would like to mark all but one value based on a hierarchy in the Status column, i.e Excellent, Good, and Bad.
Only one of each unique value can be left unmarked, and if two share the same status with no duplicate value of a higher status then either one can be marked (the one further down the list if thats easier to specify).
I have been looking around the site and have found lots of similar entries on deleting duplicates but nothing quite the same. I need to highlight and not delete the duplicate rows and I have not been able to find anything that will let me sort based on a heirarchy in a second column. I only need to execute the command once as oppose to on a recurrence so the time it takes is not a concern to me. Any help you guys can throw my way would be greatly appreciated.
See if the sheet and steps below solves your issue.
Status_order Formula: Range("E2") =VLOOKUP(D2,$I$2:$J$4,2,FALSE)
Sort A1:E15 by Name, Then by Status_Order Smallest to Largest
Delete Formula =IF(A2=A3,"Delete","")
Fill All Formulas Down
Add Conditional Formatting on all columns to be Red if Column C = "Delete"

Resources