Excel 2007 matching data - excel

I have an issue in Excel 2007 and i'm not sure how to get my end result.
I have 1 Workbook with 2 sheets.
I've already tried the VLookup, but it returns an #N/A.
First worksheet, Sheet1 has Item #, Description, Size and UPC Code.
Sheet2 has UPC Codes, but it was for inventory, so they scanned the same UPC Code multiple times, so it repeats, some for 20, others only 1.
So I need to "Count" how many times the UPC Code appears in Sheet2. I guess that would be the first step.
Next, I need to match the UPC Codes in Sheet2 to the UPC Codes in Sheet1 along with telling us the Item #, Description, & Size that correlates to that UPC Code.
Sheet1 Column A is Item #, Column B is Description, Column C is Size, Column D is UPC Code.
Sheet2, Column A is UPC Code from the inventory scan.
So my end result will be the Item #, Description, Size, UPC Code, and Qty of the scanned UPC inventory.
Can anyone help with this?
Edit
If I can just get the data from Sheet1 to Sheet2, I can get the count by UPC. So I just need help getting the data from Sheet1 to Sheet2 using Column D in Sheet1 to match it up with Sheet2 column A. I need to copy Sheet1 Column A through Column D to Sheet2 Column B thru E based on the unique identifier in Column A of Sheet2, and Column D of Sheet1. I've tried the VLOOKUP formula: =VLOOKUP(A2,Sheet1!$A$2:$D$40019,1,FALSE) but it returns #N/A but when I try to find the value in Sheet1, I can. When I change the formula to be: =VLOOKUP(A2,Sheet1!$A$2:$D$40019,1,TRUE) it returns 55942 which is an item # in Sheet1 column A but it doesn't match the UPC's. Images are below and above.

Related

Formula for filter column in Excel

Please suggest a formula for the following requirement:
One Excel sheet 1 has column A,B,...
Say, Column A has list of Email Addresses of about 2800+ users
(Column B has something irrelevant)
Say, Column C is tilted Date and Column D is titled Status
Another excel sheet 2 has Column A with email addresses of 100+ users.
My requirement:
In Sheet 1,
I want to filter out the 100+ users in column A and these 100+ users are present in Sheet 2
(I could paste the 100+ users from Sheet 2 to say Column E of Sheet 1
such that only Sheet 1 need to be considered)
So I want to filter 100+ in comparison to column E 100+ names (after copying as above)
Then I can fill in Column C & D after filter.
Note : I don't want to delete rest of the names in Column A, just want to apply filter according to Column E such that only the 100+ names appear in column A so I can fill the corresponding data in Column C & D
You can whitelist / blacklist values via the COUNTIF function in a filter.
=FILTER( range to return, COUNTIF( needle, haystack "range to return"))
So if you wanted to create a third sheet and paste those columns as you shown above you could paste this formula in cell A2...
=FILTER( 'Sheet 1'!A2:D2801, COUNTIF('Sheet 2'!A2:101, 'Sheet 1'!A2:A2801))
And it will auto-populate columns A-D with your desired data. This formula is assuming your 100 desired names are on column A starting on A2. I'm sure you can tweak this a little to fit your needs

Excel Formula Vlookup issue

I have 2 excel sheets ("sheet 1, sheet 2").
Sheet 1 and Sheet 2 have "product #" in column A and "price" in column C. I'm trying to write a formula that would allow Sheet 1 to lookup on sheet 2 if there is a Product # match In column A and if there is a product # match then to update on Sheet 1 Column C (Price) the product price from sheet 2. If there is no Match of product # from sheet 2 then to leave the price on sheet 1 alone.
I'm using this formula which returns a "0" on an error but I can't figure out how to modify it to leave price alone when there's no product # found.
=IFERROR(VLOOKUP(A2,updated!A:C,3,FALSE),0)
Thanks
The only caveat here is that you need to write this formula in a new column, let's say in D2, because you can't overwrite your original price with the formula.
=IFERROR(VLOOKUP(A2,updated!A:C,3,FALSE),C2)
This says, "if A2 matches a value in Column A of the Updated Sheet, return the price from Column C of the updated sheet, unless there is an error, in which case, use the original price on Sheet 1 (C2).
You want to use INDEX/MATCH for this:
Put the following formula in column C and populate down
=IFERROR(IF(INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0))=Sheet1!B2,B2,INDEX(Sheet2!B:B,MATCH(A2,Sheet2!A:A,0))),"")
The MATCH will find, the row on Sheet2 with the same Product ID, the INDEX will return the matching price. If it matches the one on Sheet1, the formula returns the value on Sheet1 in column B. If it doesn't it will return the price from Sheet2

Comparing two columns in two different excel sheets

I have 2 excel sheets (sheet1 and sheet2)
Sheet1 has 10 columns, sheet2 has 20 columns (no:of rows are same )
Sheet2 contains all the columns that sheet1 have
Now, compare 12th column of sheet2 with 7th column of sheet1
This should result in another column names 'Matched?' in any of the sheet (lets say sheet 2)
This 'Matched?' columns should have 500 rows with values 'Yes' if matched (or) 'No' if not matched.
Note: Kindly please start explaining from the scratch about the provided VLOOKUP() function because i don't know about it.
This little formula will do the trick for you:
=IF(COUNTIF(Sheet1!G:G; L2)=0, "No match in Sheet1", "Match in Sheet1")
Where "Sheet1" is the name of the worksheet 1
You could then modify it to (the above formula is to clearly show the logic):
=IF(COUNTIF(Sheet1!G:G; L2)=0, "No", "Yes")
Assume we have Sheet 1:
Sheet 2, we apply our formula in the column V. It check if the word Apple (cell L2 exist anywhere in Sheet 1, column G). We do this for every row.
For next row we want to check if it exist in Sheet1, we apply the formula again, the only difference is that L2 -> L3 i.e. the reference value changes since you are looking at another row.

EXCEL: matching two columns to another two columns and returning the result

Bit stuck on a problem in Excel. I need to match two columns from Sheet 1 to two columns from Sheet 2, if the results match I need to then return column D's(Sheet2) value into Sheet1. I would of done this manually but this spreadsheet is huge and the reference table (sheet2) will be updated continuously.
My Spreadsheet:
Sheet1: Column G and H
Sheet2: Column B and C
I need to return the value in Column D (Sheet2) into Column A (Sheet1).
Any help on this would be excellent!
Regards,
Neil

Excel Formula Help (VLOOKUP)

Okay. I have a SKU in column B in Sheet1, and the price in column A in Sheet1. I also have a few thousand of these SKUs in Sheet2, column A, and their respective prices in Sheet2, column B.
I'm trying to do a VLOOKUP to look inside sheet2 for the sku and their price. If the SKU exists, return it's new price, and if the SKU doesn't exist, return the original price from sheet1, columnA. And if it's a blank cell, return "DELETE".
If anyone could tell me the formula to do this you'll be my all time hero.
Try this formula:
=IF(ISBLANK(Sheet2!B1),"DELETE",IFNA(INDEX(Sheet1!A:A,MATCH(Sheet2!A1,Sheet1!B:B,0)),Sheet2!B1))
VLookup won't work, since it uses the left-most column in the table as the key, but you can use INDEX/MATCH to use an arbitrary column as the key.

Resources