Lookup reference to return list of missing UPC's

jrabi

Board Regular
Joined
Aug 20, 2010
Messages
143
I have a file with separate sheets:

Sheet1 is a store file with Store number in column A, UPC in column B and UPC Name in column C.

Sheet2 is a CORE list on a separate sheet, Column A is the product status, Column B is the UPC an Column C is the UPC Name.

I am trying to build a lookup that will look at all the UPC's on Sheet1 and compare to the UPC's on sheet 2, then if Sheet1 is missing UPC's on sheet 2, I want to list out those UPC's on sheet one, in column D.

This will tell me which UPC's are missing by store.

Also I will have many store files to compare to one CORE list of UPC's.

Is there a formula that will do this, or maybe a macro?

Or is this better done in Access?

Thanks for the help......
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I wrote a macro, but I have to do to much manual work still........I have a file with two sheets:

Sheet1 is a store file with Store number in column A, UPC in column B and UPC Name in column C.

Sheet2 is a CORE list on a separate sheet, Column A is the product status, Column B is the UPC an Column C is the UPC Name.

I wrote the following macro, but I have to copy the create another sheet and list the CORE UPC in column A, the Store UPC in column B and the macro will return any Store UPC not in the Core UPC list in column C:

Code:
<TABLE style="WIDTH: 344pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=459><COLGROUP><COL style="WIDTH: 344pt; mso-width-source: userset; mso-width-alt: 16786" width=459><TBODY><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; WIDTH: 344pt; HEIGHT: 15.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" class=xl63 height=21 width=459>[FONT=Arial Unicode MS][SIZE=2]Sub WriteMissingUPC()[/SIZE][/FONT]</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" class=xl63 height=21>[SIZE=2][FONT=Arial Unicode MS]    Dim Rw As Long, Rw2 As Long[/FONT][/SIZE]</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" class=xl63 height=21>[SIZE=2][FONT=Arial Unicode MS]    Dim iFound As Integer[/FONT][/SIZE]</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" class=xl63 height=21>[FONT=Arial Unicode MS][SIZE=2]    [/SIZE][/FONT]</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" class=xl63 height=21>[SIZE=2][FONT=Arial Unicode MS]    Rw2 = 2[/FONT][/SIZE]</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" class=xl63 height=21>[SIZE=2][FONT=Arial Unicode MS]    For Rw = 2 To Cells(Rows.Count, 1).End(xlUp).Row[/FONT][/SIZE]</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" class=xl63 height=21>[SIZE=2][FONT=Arial Unicode MS]        iFound = WorksheetFunction.CountIf(Range("B:B"), Cells(Rw, 1))[/FONT][/SIZE]</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" class=xl63 height=21>[SIZE=2][FONT=Arial Unicode MS]        If iFound = 0 Then[/FONT][/SIZE]</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" class=xl63 height=21>[SIZE=2][FONT=Arial Unicode MS]            Cells(Rw2, 3).Value = Cells(Rw, 1).Value[/FONT][/SIZE]</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" class=xl63 height=21>[SIZE=2][FONT=Arial Unicode MS]            Rw2 = Rw2 + 1[/FONT][/SIZE]</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" class=xl63 height=21>[SIZE=2][FONT=Arial Unicode MS]        End If[/FONT][/SIZE]</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" class=xl63 height=21>[SIZE=2][FONT=Arial Unicode MS]    Next Rw[/FONT][/SIZE]</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" class=xl63 height=21>[FONT=Arial Unicode MS][SIZE=2]    [/SIZE][/FONT]</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15.75pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" class=xl64 height=21>[FONT=Arial Unicode MS][SIZE=2]End Sub[/SIZE][/FONT]</TD></TR></TBODY></TABLE>


This works fine for one store, and I have to copy the core UPC list and the store UPC list to a separate sheet everytime.

What I would like is to have the macro list the missing UPC's on a separate sheet called missingUPC, but I would like to see the following:

column A to list the store number(from Sheet1, columnA)
column b to list the UPC
column C to list the UPC name.

This would give a complete list of what I need while allowing me to import into this sheet multiple stores inventory to compare to the Core UPC list(which will not change much).

Any suggestions?
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,172
Members
452,893
Latest member
denay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top