Adding in information from one spreadsheet to another - excel

Good Morning,
I have a spreadsheet with 40,000 products and a spreadsheet with 35,000 products all with item ID's
Is there anyway I can add in the missing 5,000 ITEM ID's using a forumla? I dont want to manually go through each item and see what is missing
Thank you very much for your time and help
Cheers

If ColumnA holds the unique ID's in each sheet please try:
=COUNTIF(Sheet1!A:A,A1)
in Sheet2 and
=COUNTIF(Sheet2!A:A,A1)
in Sheet1, both copied down to suit.
Then sort both on the results of these columns and copy those that result in 0 from one sheet to the other to ensure complete sets in both sheets and to check whether either sheet has duplicates.

next to column "A" in your longer list, put a formula in cell B1 assuming your data starts from A1:
=if(isna(VLOOKUP(A1,**column A of first shorter list**,1,false)),"Missing","Exists")
and populate down until the end of the list, the entries reading "missing" are the ones that are missing from the first list.

I assume your list of source IDs lays in Sheet1!A2:A40001, row 1 is for headers. The target IDs are in Sheet2!A2:A35001
Detect which are missing.
Use the following formula in Sheet1!B2:
=MATCH($A2,Sheet2!$A$2:$A$35001,0)
Copy down to Sheet1!B2:B40001.
Filter out those already present.
Select row Sheet1!1:1. Use Data -> Filter. Go to the drop-down arrow in cell B1, and select only #N/A.
Copy those missing.
Select all values shown in column Sheet1!A:A. Copy, and paste below the last value in column Sheet2!A:A.
It is easy to figure out how to do the same if you have adjacent columns with relevant data that you want to copy as well.

Related

How can I filter a column for a list of data in excel without using VBA?

I have an excel sheet with 14000 rows and 9 columns, first column is Name, second one is phone number etc... and I have a list of 100 phone numbers that I want to filter out, but so far I can only filter a single value in that list and get a single row as a result. but I would like to get all the rows with phone numbers that are in my list. How can I filter for more than one value?
Without VBA:
First put your delete-list in Z2 through Z101. Then in column 10 cell J2 enter:
=IF(ISNA(MATCH(B2,Z:Z,0)),"","KILL")
and copy downwards. Filter on the newly added column and delete all KILL rows.
(If you need to preserve the kill-list, place it on a separate sheet)
This formula looks for Name that match Phone
This is easy to do with Excels Advanced-Filter an without any helper column:
1) Goto Data
2) Choose Advanced Filter
3) Follow the Dialog
You can choose if you want to filter your Data on same place (overwrite the old one) or copy the filtered data on a new place. Also you can remove duplicates if necessary.

Excel Structed Reference to filter Table and produce List

I want to filter a table in excel and return a different column to create a list for data validation.
My table contains a list of names and one of the columns is a Yes or No for being an admin.
I want to create a data validation list on another sheet and use the filter table to just show those names that have a Yes in their associated row in the table.
I recorded a macro to filter the table to show just the rows I need and now want those names to appear in the list.
ActiveSheet.ListObjects("Staff").Range.AutoFilter Field:=8, Criteria1:="<>"
Is this possible?
I had tried using the =FILTER() formula but it's not available in my version of Excel.
I'd prefer to do it with a formula in the validation settings rather than VBA.
This is something of a faff but I think it works, though by no means the best way of doing it.
Table of data on the left.
The "Yes" names are listed in D1 and down, the formula is an array (use Ctrl, Shift and Enter to confirm). I'm sure someone cleverer than me can shorten this.
=IF(ROWS(D$1:D1)<=COUNTIF(Table1[Admin],"Yes"),INDEX(Table1[Name],SMALL(IF(Table1[Admin]="Yes",ROW(Table1[Name])-ROW($A$2)+1),ROWS(D$1:D1)),1),"")
E1 is just the total of the names shown in D (another array formula):
=SUM(IF(LEN(D:D)>0,1,0))
The DV is in G1 and the formula there is
=OFFSET(D1,0,0,E1,1)
If you change e.g. Sarah to Yes, her name will appear in D and will be added to the DV list.
Once you've applied your filter to column 8, you can select the range that remains visible in a different column using:
ActiveSheet.ListObjects("Staff").Range.Columns(8).SpecialCells(xlCellTypeVisible).Offset(0, -2)
This would return a range consisting of column 6 (8-2) of your table. Adjust to suit your needs.
You could then cycle through that range one cell at a time and populate a new range from it, accordingly.

Lookup a cells in one worksheet and return value into another work sheet

I have data in one worksheet showing order no. with items and qty
enter image description here
In another work sheet I would like to enter the order number and all the items and quantities for that then order number are displayed. hope it makes sense.
It is not clear whether you need a list or a sum at the other sheet but if it is the SUM then below solution would work for you. If you need a list then most probably a VBA solution will be needed.
Assuming that your data is on Sheet1 and at Cols A to C:
Write below formula to B1 on Sheet2 and copy down. When you write an Item code to Col:A, the total calculated of that Item will be shown at Col:B
=SUMIFS(Sheet1!C:C;Sheet1!B:B;Sheet2!A1)

Find cells and save information to the left of that cell

I have a spreadsheet with some 20,000 rows. I have another spreadsheet with around 50 names. The 50 names exist in the sheet with 20,000 rows, and in the column to the left of the name is the information I want.
The spreadsheet looks like the table below (I dont have enough "reputation" to post a picture)
987884_R5 Rusescu, Iulian
T1025189_R1 Rusescu, Iulian
T1069036_R1 Pauls, Henrik
T1092840_R1 Pauls, Henrik
T1099343_R2 Pauls, Henrik
857825_R1 Davidsen, Thomas
I want to search these 50 names (e.g. "Rusescu, Iulian", "Pauls, Henrik") and save the information to the left of them, but do it all at once instead of using Ctrl+F for every single name. I will have to repeat this task a couple of times with other documents and want to save time.
Can anyone help me? I'm really bad at Excel, but trying to learn it.
Thanks!
Assuming 987884_R5 is in A2 and you list of names is in ColumnA of Sheet2, copy your long list to a new sheet and in C2 there put:
=VLOOKUP(B2,Sheet2!A:A,1,0)
and copy down to suit. Filter ColumnC for #N/A and delete selected rows. Unfilter and delete Column C.
EDIT: Actually this only gives the first instance of info next to a name, I can't really find a way around this, so I'll just leave it here as it might be useful for someone with a sheet of unique names.
So if we call the 20,000 row sheet Sheet1 and the 50 names sheet Sheet2, and assuming the names in Sheet2 are in col A; enter in Sheet2 B1 next to the first name:
=INDEX(Sheet1!A:A,MATCH(A1,Sheet1!B:B),0)
This will result in the list of 50 names in col A in Sheet 2 having the info associated with those names in col B.

Copy duplicate values from one column to a separate sheet

I have a list of names in one column in sheetA. I want to copy the duplicate names from sheet A to sheet B and also provide a count of those duplicate names beside each copied name in sheet B.
I’m guessing it is ‘manually’ so would suggest a helper column in sheetA with =COUNTIF(A:A,A1) copied down (assuming your list of names starts in A1. For each row this should count the number of rows that contain that row’s name.
Copy ColumnA:B into your sheetB with Paste Special Values, then use Data > Data Tools – Remove Duplicates and filter and delete all rows with 1 in the count column.
easiest method I can think of would be a pivot table, rows=names, columns=count of names, filter table for counts greater than 0? then when you want to run a fresh report, past in the original information and refresh the table?
Probably way too late to be helpful, but maybe for the next person...

Resources