I have two excel sheets. Sheet 1 has roughly 2400 rows (and will continue to grow) and sheet 2 has roughly 4400 rows (and will also continue to grow. Sheet 1 has one column and sheet 2 has 2 columns (but I only care about the first column). I need to compare sheet 1 and sheet 2 and be able to see what sheet 1 values are NOT in sheet 2. Ideally, this data would then populate a new sheet 3.
I have searched through many sites and many pages here with stackflow, but because I am so new at this, I'm not sure if I have come across what I need or not. Everything I have tried is not working.
Any help would be greatly appreciated!!
Additionally to the already mentioned vlookup or match alternatives you may copy the values from Sheet1 to a new worksheet and add a column "source" where you enter "Sheet1". The same you do with the values from sheet 2. And then you create a pivot table to see immediately which values are on which sheet:
Related
I have a excel file that hase 4 Sheets. 3 Sheets for Data based off of the ORG of that Data. Then 1 Sheet for User Input. Each of the Orgs sheets have up to 20 Columns A-T of Data that I want to concatenate. So basically if a user puts a value in Col A on the Input Sheeet the 3 other Sheets in COl U would then fill in. So for Example Say Col A has a value and COL F and Col H. Those COLS would then Concatenate in COL U on the 3 Other sheets.
I currently have a Formula that does this in Excel with a bunch of IF statements but this is very slow As the Sheets of a few of the data sets are very large. One with over 140K rows of Data. So I am hoping to find a way with VBA to check which Cols in the Input Sheet are Filled and Then concatenate in the Data Sheets based off that. I have a Search button and have automatic formulas off so the Search buttton currently then calculates all the formulas. So I can run this code off of that hopefully. but I don't know much about VBA and if it would speed this process up much more then it is currently as it can take a little while currently. I have attached some Screenshots of the Input and Data Sheets. Data being hidden though.
I currently do some lookups after the Excel formulas run with those Concatination to return values to the User. Both ORG 1 & 2 have 20 Columns A:T, Org 3 has 18 A:R. so thats the Only Differenece in the 3 Data Sheets
Once again all i am trying to do is concatenate whatever Columns the user inputs into each Sheet which has thousands of rows on each Sheet.
Input Sheet
What ORG 1&2 Sheet look like
What ORG 3 Sheet Looks like
Any help is appreciated. I have looked on here and seen VBA concatenation but nothing quite similar to this task.
I have an excel workbook with 2 sheets.
Column A of Sheet 1 and 2 are the exact same data. When I sort the first sheets data, Sheet 2 Column A is automatically sorted because it is referenced. (='Sheet1'!$A$2:$A$100).
But when I sort the above, Column B's cells in Sheet 2 don't follow the row of data. Now the data gets messed up because B2 in Sheet 2 did not move with the original A2 data that is referencing the first sheet.
Is there a way to keep the data together?
Below are images of sample data:
Sheet 1
Sheet 2
Now when I sort sheet 1 from Z-A:
Sheet 1 Sorted:
Sheet 2's sorted data (Not matching)
I want the phone number and contact name in sheet 2 to follow Alafia Village. Is there a way to make that happen?
For what it's worth, I don't agree that this is fundamentally bad design. If your two sheets were two tables in a database and you wanted to join them on 'something' so that the name was taken from the first table and the other details from the second table, that would be fine - much better than duplicating the names in the second table, which would be bad design. The only is issue is that the 'something' here is the row number and as soon as the order in sheet 1 changes, the row number doesn't work any more.
The answer would be to have a key in sheet 1 and look up the key in sheet 2. If this key were in column C (say) in both sheets, you would have an index/match in column A of sheet 2 like this:
=INDEX(Sheet1!A:A,MATCH(C2,Sheet1!C:C,0))
In practice, you might also want to look at Power Query.
I'm in the process of working with an Excel file that contains two columns (old URL and new URL). But it contains about 20,000 rows.
And I have another file containing about 400 old/new URL that needs to be imported in the big ±20,000 rows file.
I have to do all kinds of processing, like:
- Find all duplicate rows (same two columns more than once...). That functionnality would be in a column and it would be good to run that function each time I add 1 row to check if that URL combination already exists in the file
Note that I already turned the sheet into a table.
2 questions now:
1) should I do some kind of vlookup from the ±20,000 rows sheet and the ±400 rows sheet, or VBA? I don't know what would be the best way to do this (i.e.: if that row from the ±400 rows sheet is not in the ±20,000 rows sheet, add it...). Should I use vlookups or populate arrays in VBA (speed-wise)? If I use vlookup, it is true that it is possible to put the vlookup function in a sheet and refer to it in every row instead of puting a vlookup function directly in every row?
2) How can I optimize the 20,000 rows sheet because now, each time I want to sort or filter, it takes an eternity to redraw and it freeze my PC for that time!
Thanks for you help.
Firstly to ommit the dupes from the 400ish row sheet that need to be added in, use a COUNTIFS formula against the big sheet, then sort by this value and only copy in things where there is < 1 for the value (or error).
Secondly I would probably do the same thing in the big sheet but referencing itself, anything with a value above 1 is a dupe.
Lastly, are there formulas in the 20,000 row sheet? I could set up a 20,000 row sheet with just a "1" in range A1:A20,000 and doing anything on it would be super quick. It all comes down to what data you have in there and what you can do to reduce it's load on the system (ie convert formulas to values if they no longer need to calculated)
Excel 2007 has a built-in feature and VBA you can use for your situation: Range.RemoveDuplicates or Data tab -> Data Tools group -> Remove Duplicates
For example data:
Click the Remove Duplicates button:
And you are done!
The VBA equivalent is:
ActiveSheet.Range("$A$1:$B$10").RemoveDuplicates Columns:=Array(1, 2), Header:=xlYes
Note the 1 & 2 does not mean Columns A & B. It means the Columns of the selected Range.
If your worksheet only contains 2 columns, you could use UsedRange instead.
I'm trying to combine data from 3 separate spreadsheets:
-All three sheets have a common column called "Tag" which has ID numbers
-Sheet 1 contains the most info and will be used as the sheet where everything will be merged into.
-Sheet 2 has certain dates which i would like to move to sheet 1 but i want the info matched up with the correct ID numbers and hence end up in the same row in sheet 1 as the data in sheet 1 with the same ID number
-Sheet 3 also has certain info i would like to move to sheet 1 and i also want the info presented the same way as the info from sheet 2.
How should I go about doing this? I'm not as good with vlookup and pivot tables and im unsure what can help me best and how to do it.
thanks in advance for your help.
Here is an example of Vlookup:
You can simply use this formula to populate all the other data for each tag on your master worksheet.
Autofill is a way of populating formulas and values into other cells - by dragging your initial formula into those other cells. You should read about it as it is an essential part of nearly any use of excel.
http://www.homeandlearn.co.uk/excel2007/excel2007s2p2.html
I am trying to sum the totals of data stored in 3 sheets based on 2 variables into a summary sheet (ie. a forth sheet).
I want to match both the place name and the week number for each place on the summary sheet.
On the Summary table we have at the top the week number we want to use. A list of places in column A and the number of visits in column B.
THis formula worked.
=SUMIFS(ND!$V$3:$V$4000,ND!$F$3:$F$4000,TEST!$A$1,ND!$B$3:$B$4000,TEST!A3)
In column B of the summary sheet for each row. However it only looks up data from one sheet not all 3. I tried this but it causes an error:
=SUMIFS(AND(ND!$V$3:$V$4000,GK!$V$3:$V$4000,TW!$W$3:$W$4000),AND(ND!$F$3:$F$4000,GK!$F$3:$F$4000,TW!$F$3:$F$4000),TEST!$A$1,AND(ND!$B$3:$B$4000,GK!$B$3:$B$4000,TW!$B$3:$B$4000),TEST!A3)
How do we get it to work.
Could you just use the formula
=SUMIFS(ND!$V$3:$V$4000,ND!$F$3:$F$4000,TEST!$A$1,ND!$B$3:$B$4000,TEST!A3)
3 times like
=SUMIFS(ND!$V$3:$V$4000,ND!$F$3:$F$4000,TEST!$A$1,ND!$B$3:$B$4000,TEST!A3)+SUMIFS(GK!$V$3:$V$4000,GK!$F$3:$F$4000,TEST!$A$1,GK!$B$3:$B$4000,TEST!A3)+SUMIFS(GW!$V$3:$V$4000,GW!$F$3:$F$4000,TEST!$A$1,GW!$B$3:$B$4000,TEST!A3)