Combining and Merging Similar Part Numbers with filename - excel

I'm trying to combine all the same part numbers on excel, in order to have one part number, but reference the filenames. However, when there is more than one file, I need to separate them by a comma.
Most of the vlookup and merging I have tried only pulls one item. And when I merge the part numbers I lose some filenames.Attached is the file showing the punctuated part number and file name. Some punctuated part numbers show up more than once while others only show up once. For every duplicate part number the filename is different as it contains a different view of the product.

Does it have to be in one cell with commas in between? With a few clicks you can create a pivot table with part number and file name in the rows area. This will group the data by the part number.
You can use a formula if you have a list of unique part numbers. The formula in H2 uses TextJoin like this:
=TEXTJOIN(", ",TRUE,IF(Table1[part]=G2,Table1[file],""))
Copy down.
This is an array formula and unless you have an Excel version with the new Dynamic Array formulas, you need to confirm it with Ctrl+Shift+Enter.

Related

Get duplicates from two columns

I'm having trouble filtering an excel table. M, it is a set of two rows from two tables, where it is necessary to find duplicates.
2 rows with duplicates
Some idents are repeated, they are present both in the current and previous months. In the example below, with the help with this function =IFERROR(MATCH(A2;B:B;0); "NO"), I obtained information about which data from last month is repeated in the current month and exactly in which row it is located. The code for determining whether it is repeated is as follows =COUNTIFS($A$2:$B$13;A2)>1
duplicates and if repeated
I would like to retrieve only duplicates from the list, I tried the code =IFERROR(INDEX(A:A;SMALL(IF(NOT(D$2:D$104=TRUE);ROW(B2)-ROW(INDEX(B2;1;1))+1);ROW(G:G)));" ERROR")to get the ones that are repeat and skip those ones that arent, but the result is not as desired. In line G, you can see an example of how Excel gives me data regarding the entered function. In cell H, it is shown how I would like a new row to be created with only duplicates.
Current vs. desired display
In this example, the columns are a bit small, but in reality there could be at least a thousand rows, so I would need help filtering those.
You implied these columns were present in two different tables. So I used Tables with structured references. You can convert to normal addressing if you require that instead.
If you have Windows Excel 2021 or later, you can use:
=FILTERXML("<t><s>" &TEXTJOIN("</s><s>",,UNIQUE(LastMonth[Last month marks],FALSE,TRUE),UNIQUE(CurrentMonth[Current Month],FALSE,TRUE))& "</s></t>","//s[following::*=.]")
Create a list of distinct items for each row
Create an XML by concatenating the items into an array using Textjoin
Extract only those items that are followed by an identical item
With your earlier version of Excel, again, I would still use Tables and structured references but I would also use a Helper Column
D2: =IFERROR(MATCH(lastMonth[#[last month]],currentMonth[current month],0),"NO") *and fill down*
E2: =IFERROR(INDEX(currentMonth[current month], AGGREGATE(15,6,[Duplicates in Which Row],ROWS($1:1))),"")

Excel: Find matching email addresses in ALL columns

I'm trying to clean up some email lists. I've got eight CSVs of email addresses. I'm trying to find email addresses that appear in ALL eight lists.
I've tried copying and pasting them into a single Excel document (a column for each list). But I am only able to compare TWO columns using methods like this:
=IF(COUNTIF($B:$B, $A2)=0, "No match in B", "")
so it doesn't tell me if there's a match in ALL columns (and technically that code tells me if there isn't a match). I can sort of figure it out by comparing two lists, then using those results to compare it to the third list, then use those results and compare it to the fourth list, and so on until I get through all eight lists. But
I've also tried using conditional formatting which formats duplicate values, but it again doesn't tell me if the match appears in ALL columns (it highlights if there's even one match).
Is there any way in Excel that I can indicate either with highlighting, or copy the value to a new column, any email addresses that appear in ALL columns?
So, just one formula:
SUM(IF(IFERROR(FIND(J3,A$3:H$12,1),0),1,0))>=8
See:
Just used names as you did not provide any data.
You can do it easily with Pivot Tables. Instead of creating a column for each CSV file (like the left part of image above), just copy all of them in the same column, one CSV after each other (like column E in image). Then insert a Pivot Table:
Take field Email into Values section and rows Section
Filter by values using the number of CSV as criteria (3 in the image, 8 in your case because you got 8 CSV files)
Create a PivotTable to analyze worksheet
data
Results are the emails that appear in all CSV.
Of course, this will work only if each e-mail appears once in each CSV file. If there are duplicates, you'll need to deduplicate each CSV before creating the unique column

Index and match but have duplicate text values

I am trying to create an index and match formula on a spreadsheet, however my data in the left column has identical names in this column (This is due to this being a different part in a different device). Is there a way I can get this to identify between the two parts?
In E2, formula copied down :
=IFERROR(INDEX(H:H,AGGREGATE(15,6, ROW(G$3:G$17)/(G$3:G$17=D2),COUNTIF(D$2:D2,D2))),"")

Extract numbers from a comma separated list using excel formula and perform a lookup

In MS Excel, a List of commas separated numbers
In a column, I have a text string number list ( up to four numbers) that represent row numbers in a table ( 'MyTable' in another worksheet). These numbers are entered by a user, that looks like the example list below:
23,234,2,16
The Goal using MS Excel
My goal, in the next column, is to perform and concatenate a lookup of each row number in the above list from a table.
E.g. Vlookup(23,MyTable,2,)&Vlookup(234,MyTable,7,) etc.
My question: The Challenge
In excel, I need a formula to extract from the comma separated list above, each number in turn and use it as the lookup value in a series of concatenated VLOOKUP formulae as shown above. The list can contain between one and four numbers.
You can put the string in a cell. Use Data->Text to columns. That will split this data into 4 columns. If you want it vertically stacked, you can copy it, Paste Special->Transpose.
Then, you can apply VLOOKUP over that. If you do want wish to transpose, HLOOKUP will work for you.

How to combine two excels that have a common column (but aren't in the same order)

I have two excel files, one that I pulled from excel and the other that I pulled from SAP. One file, the larger one, has a column named EmployeeID and the other has a column named EMP_ID, the only difference is the name, the actual employee id within these columns is the same. What I am wanting to do it combine these two files to make a single file; however, for example, Employee ID 'ZZZ' on the first excel file may be on line 1, but on the other file the EMP_ID of 'ZZZ' may be on line 35.
Is there a way to somehow combine these 2 files? Also, sorting by EMP_ID A to Z won't help, because the files don't have the exact same number of entries, so that wouldn't sync them so that each employee is on the same line on each file.
These two files are for reference if it matters. File 1 - http://i.imgur.com/go1S6Ra.png File 2 - http://i.imgur.com/x4vOKIN.png
Here's a pure excel solution. Open file 1 one and go to an empty sheet. Copy and paste the content of file 2.
Go to the first cell in a blank column on sheet two and use vlookup. The formula will look something like this, but you'll have to modify it.
=VLOOKUP(A1,Sheet1.$A$1:$B$419,2,FALSE)
There are four arguments and you will need to play with the first three to get what you want.
A1 Change this to the cell where the employee ID lives in sheet two. So if it's in the third column, this should be C1
Sheet1.$A$1:$B$250 This is where the data from file 1 is. The default name for the first tab is Sheet1 but it might be something different depending on how you opened the file. The second part is the data range. Top left cell and bottom right cell. So if you have 5 columns in sheet one and 1000 rows it will be $A$1:$E$1000 (I'll explain the dollar signs at the end)
1 The third argument how many columns the target data is to the right of the employee ID. So if your columns are ID, First Name, Last Name, putting 3 here would get you the last name.
FALSE, this controls excel's matching behaviour. TRUE looks for close matches, but really it just makes thing unpredictable.
Once the search is working and you're looking up what you want, fill the formula in for the rest of the column. You will get an error if the ID you're trying to lookup isn't in Sheet1, so make sure you tweak the formula on one that exists. If you need to look up multiple things (e.g. First Name and Last Name), just drag the formula to the right and put in a different number for the third argument.
So what's the deal with the dollar signs? This affects what happens when you drag the formula down or over into new cells. If you write this:
=VLOOKUP(A1,Sheet1.A1:B100,2,FALSE)
and drag it down one cell you'll get this:
=VLOOKUP(A2,Sheet1.A2:B101,2,FALSE)
All the row coordinates go up by one. If you dragged it over instead, all of the column coordinates would go up by one, like this:
=VLOOKUP(B1,Sheet1.B1:C100,2,FALSE)
Dollar signs freeze them in place, so the range doesn't drift. You want the search value to keep moving because every line should be looking up the next employee ID, but you don't want the range to move.

Resources