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.
Related
need some help on my excel production report.
I want to Lookup for the daily unique ID, gram and pieces from Sheet 1 into Sheet 2.
The daily unique ID consists of up to 5 categories.
Each day, there could be up to a maximum of 3 unique ID produced with each one having different categories (some have 2 same categories with different grams and pieces. It need to be shown in a separate column in Sheet 2), grams and pieces.
I came out with an excel formula but it only works IF there is only one daily unique ID per day. If there is more than one unique ID, this formula fails as it only captures the first one.
Please see my formula below
I2:I100 is the gram in Sheet 1
E2:E100 is the "unique code-category" in Sheet 1
D11 is the unique code in Sheet 2
P11 is the type of categories
{=IFERROR(INDEX('A'!$I$2:$I$100,SMALL(IF(($D$11&"-"&$P$11)='A'!$E$2:$E$100,MATCH(ROW('A'!$E$2:$E$100),ROW('A'!$E$2:$E$100)),""),ROWS($A$1:$A1))),"")}
Is there a way I could capture everything?
Can I do it with excel formula or a VBA is required?
I have tried many different formulas but nothing came out right, please help :(
Please let me know if my explanation isn't clear. Thanks.
Sheet 1
Sheet 2 (Final Report)
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:
I have two excel files that I need to cross reference amounts in.
The first sheet looks like the below:
what I need to do is find any amount that are contained on sheet 2 and the month they fall into.
Sheet 2 looks like below:
for example on sheet 1 I have 56.49 in column C for reference AK1080117 in column A and this shows as Person 8 on sheet 2.
I can see this is correct as on sheet one it has a transaction date of 08-jan and on sheet 2 is in the column JAN.
There is no same ref that can be used between sheet 1 and 2 as sheet 1 has Reference and sheet 2 has Name.
Can anyone advise the best way to do this.
The complete sheets are hundreds of lines long.
Many thanks,
Note: Make sure your data has unique values AND it is not exceding the year 2017
If so, I have found a way to maybe do this in a few steps:
1: Add another column E to your first sheet and add this formula to second row of the column and drag it all the way down:
=SUBSTITUTE(ADDRESS(1,MONTH(B2)+1,4),"1","")
2: Now create another column F next to the freshly made one and put this formula in second row:
=MATCH(C2;INDIRECT("Sheet2!"&E2&":"&E2);0)
3: Now create a third column G and put this formula in second row to be dragged down:
=INDEX(Sheet2!A1:D15;F2;1)
4: Now you have created a cross-reference because column G will show you the person with a match.
Edit: You can combine the three formulas direclty obviously but my personal preference is to brake things down to make them easier to understand :)
=INDEX(Sheet2!A1:D15;MATCH(C2;INDIRECT("Sheet2!"&SUBSTITUTE(ADDRESS(1,MONTH(B2)+1,4),"1","")&":"&SUBSTITUTE(ADDRESS(1,MONTH(B2)+1,4),"1",""));0);1)
Good luck with it!
You need a third table that has Reference and Name. Then you can use lookup functions or table relationships to link the data together.
Ask the source of the first table to include Name as a field.
So here is my situation: I need to take two spreadsheets in excel and combine the data together so that any additional data is paired up with common data between the cells. Here's an example of what I mean.
Sheet 1
1234567, JOHN, DOE, 1234567.JPG
Sheet 2
JOHN, DOE, 6634
First and Last names are common data, but the number in the second sheet does not exist in the first. The user list in both sheets are slightly different from each other so I can't simply alphabetize the names and move the additional column over. I have about 500 users to go through and may have to use what ever solution I come up with for similar lists of users.
Any assistance would be great.
There's various techniques you can use to combine data but you'll have to be a bit more specific. For example is there a fixed number of columns that sheet 1 doesn't have that sheet 2 does?
The basic technique would be to create some sort of unique identifier, perhaps by concatanating the names together in both sheets? that way you can use VLOOKUP to put all the missing data in one sheet into the other
Not sure I understood "I cant alphabetize the names". However, if the names have the same spelling i.e John is John in both sheets you can concatenate John and Doe in sheet 1 and do same in sheet 2 and use a vlookup function. Something like
A=cellcontainingJohn&CellcontainingDoe in sheet1
B=cellcontainingJohn&CellcontainingDoe in sheet2
C= Vlookup(A,rangeforB,columnnumber)
Here's what I would do:
Select the sheet into which you want to pull data from the other. I'll assume we're pulling data from sheet 2 into sheet 1.
In sheet 2, insert a column to the left of what you have already. JOHN is now in column B, DOE in column C, and 6634 in column D.
In sheet 2, column A, row 2 (assuming you have a row of column headers) which is currently empty, use the formula
=CONCATENATE(B2,C2)
Now, head back over to sheet 1. Let's assume you also have a row of column headers in sheet 1, so the cell immediately to the right of your 1234567.jpb is E2 and it's empty. In E2, use the following formula
=IFERROR(VLOOKUP(B2&C2,'Sheet 2'!$A:$D,4,FALSE),"")
That should give you what you're asking for, if I understand your question correctly.
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)