VBA Macro to Find Missing and Duplicate Data

QuillPet

New Member
Joined
Oct 4, 2023
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Hello,

I need a VBA code that will find the missing values in Sheet2 based on Sheet1, i.e., data in Sheet1 but not in sheet2. Afterward, I want to see the data in another sheet as given in the attached mini sheets. Also, I want to find out the duplicate values of Sheet1 and Sheet2. Can anyone create a VBA code to do so?

Much appreciation in advance!

Sheet1 Data:
Compare between 2 Sheets.xlsm
ABC
1BSA Agent X 20" Blue Pink4
2BSA Champ 16" Green2
3BSA Champ 16" Red4
4BSA Champ 16" Victor Blue2
5BSA Champ 20" Red2
6BSA Champ 20" Sea. Foam Green8
7BSA Champ 20" V.Blue6
8BSA Champ Orbit 20" Cel. Blue12
9BSA Champ Orbit 20" Red6
10BSA Daisy 14" Sky Blue2
11BSA Ladybird Diana 24" Doodle Pink8
12BSA Doodle 20" Victor Blue4
13BSA Go 20" Matt. Black Neon Orange2
14BSA Go Biking 14" Victor Blue Grey2
15BSA Go Biking 16" Ferrari Red & Led Grey2
16BSA Ladybird Hazel 24" Sports Purple10
17BSA Ladybird Hazel 24" Pearl Pink12
18BSA Kinder 14" Blue2
19BSA Kinder 14" Red2
20BSA Kinder 16" Red2
21BSA Kinder 16" Sunflower Yellow6
22BSA Kinder 16" Victor Blue4
23BSA Kinder 20" Doodle Pink4
24BSA Kinder 20" Lawn Green2
25BSA Kinder 20" S.Red2
26BSA Kinder 20" Sunflower Yellow 6
27BSA Kinder 20" Victor Blue6
28BSA Ladybird Diana 26" Doodle Pink22
29BSA Ladybird Diana 26" Sea Foam Green4
30BSA Ladybird Diva 26" Clestial Blue6
31BSA Ladybird Diva 26" Sports Purple2
32BSA Ladybird Hazel 26" Artic .Blue2
33BSA Ladybird Hazel 26" Pearl Pin k4
34BSA Ladybird Hazel 26" Sports Purple6
35BSA Ladybird Shine 26" Citron Green8
36BSA Ladybird Shine 26" Clestial Blue12
37BSA Ladybird Shine 26" Pearl Pink2
38BSA Ladybird Sofia 26" Aqua Marine Blue M.Pink6
39BSA Ladybird Sofia 26" Larosa Pink Macron Pink2
40BSA Ladybird Summer 26" Pink4
41BSA Roamer 12" Red 2
42BSA Roamer 16" Citron Green2
43BSA Roamer 16" Metalic Blue2
44BSA Roamer 16" Metalic Red4
45BSA Roamer 20" Green4
46BSA Roamer 20" Red16
47BSA Shine 24" Pink20
48BSA Toonz 16" Pink2
49BSA Trooper 20" Green Golden Yellow2
50Cosmic Comet 26" Black Orange1
51Cosmic Comet 26" Blue Yellow1
52Cosmic Comet 29" Black Blue1
53Cosmic Fern 24" Pink1
54Cosmic Jade 16" Pink1
55Cosmic Jade 16" Violet2
56Cosmic Jolt 29" Yellow Blue1
57Cosmic Level 9160 27.5 Silver Red1
58Hercules Streetcat Pro 24" Matt. Black Red6
59Hercules Wildrock IC RF 26" Black Red2
60Hercules Photon Speed Star 26" Matt. Black 2
61Hercules A-220 HT DX2 29" SS Matt. Balck Twitter Blue4
62Hercules A-220 HT DX2 27.5" Matt. Black Frame Orange3
63Hercules Atom ZX - 26" Black Orange2
64Hercules Brut 2.0 ZX - 26" Matt. Black A. Green2
65Hercules Captain EX - Gents RB2
66Hercules Captain EX - Ladies RB2
67Hercules FX - 200 IC 26" Victor Blue Matt. Black2
68Hercules Kombat R/F 24" Black4
69Hercules Kombat RF - 26" Black4
70Hercules Kombat RF - 26" Red4
71Hercules Kombat ZX - 26" Matt. Balack A.Green4
72Hercules Sparx 2.0 RF 24" Black6
73Hercules Sparx 2.0 RF 26" Victor Blue4
74Hercules Standard Green16
75Hercules Street Rider R/F 26" Black2
76Hercules Street Rider RF 24" Black2
77Hercules Street Rider RF 24" S.Red6
78Hercules Street Rider RF 26" Victor Blue8
79Hercules Streetcat IC HT DX2 26" Matt Black6
80Hercules Streetcat Pro 24" IC - Victor Blue6
81Hercules Streetcat Pro 26" Acid Green2
82Hercules Streetcat Pro 26" Tropper Grey2
83Hercules Streetcat Pro HT DX2 26" Black A.Green4
84Hercules Streetcat Pro IC 24" A.Green2
85Hercules Streetcat Pro R/F 24" (DB - Rim) Black Green4
86Hercules Streetrider R/F 24" Smart Red4
87Hercules Streetrider ZX 24" Smart Red Black2
88Hercules Streetrider ZX 26" Black A.Green6
89Hercules Trailfire HT 26" Ivory White6
90Hercules Trailfire HT 26" Matt. Black N.Green4
91Hercules Trailfire R/F DX2 26" Magic Blue F.Orange8
92Hercules Tussle 26" RF Black4
93Hercules Tussle 26" RF Red2
94Hercules Wayfinder IC HT DX2 26" Matt. Black2
95Hercules Wildrock IC HT 26" Glossy Black Twitter Blue2
96Hercules Wildrock IC R/F 26" Glossy Black 4
97Hercules Wildrock R/F 24" Black Twitter Blue4
98Hercules Wildrock R/F 26" Glossy Black 2
99Hero Jackoo 12" Red8
100Hero Blaze 16" Purple6
101Hero Blaze 16" Red2
102Hero Blaze 16" Yellow2
103Hero Bobcat 16" Black2
104Hero Bobcat 20" Red2
105Hero Boomer 16 Orange4
106Hero Boomer 16 Pink4
107Hero Boomer 16" Green2
108Hero Boomer 20" Orange2
109Hero Boomer 20" Pink2
110Hero Colt 26" Black2
111Hero Colt 26" Sky Blue2
112Hero Jackoo 1420
113Hero Jet Green Standard4
114Hero Miss India Velvet 26" Pink2
115Hero Rafale 26" Black4
116Hero Ride On 16" Green2
117Hero Ride On 16" Red4
118Hero Ride On 20" Green2
119Hero Ride On 20" Red4
120Hero Rock Star 16" Pink2
121Hero Rock Star 20" Red2
122Hero Rockstar 12" Green2
123Hero Rockstar 12" Pink4
124Hero Rockstar 12" Red2
125Hero Sting 16" IC Black4
126Hero Sting IC 20" Red2
127Hero Sundance 20" Red2
128Hero Sundancer 16" Pink4
129Hero Sundancer 20" Pink6
130Hero Urban Trail 26" SS Black2
131Hero Urban Trail 26" SS Blue2
132Hero Urban Trail 26" SS Red4
133Hero Whistle 16" Black2
134Hero Whistle 16" Red2
135Hero Whistle 16" Sky Blue2
136Hero Whistle 20" Black6
137Hero Whistle 20" Sky Blue2
138Hero Winner 16" Black2
139Hero Winner 16" Red 2
140Hercules FX - 100 DX2 3.0 26" SS Matt Black N.Orange7
141Machcity Munich 700 x 35 C SS Med. Pac. Blue5
142Machcity 26" S/S Med Forest Green17
143Machcity Munich 700 X 35 C 21 SP Med. Pac. Blue1
144Machcity S/S 26" Medium Victor Blue25
145Montra Downtown 700 C Med. Neon Yellow Black2
146Montra DTR 20" 6 SP Lava Red with Black2
147Montra DTR 20" 6 SP Red with Black Graphics1
148Ninety One Bombay 26" M.S DD Black Red2
149Ninety One Bombay 26" M.S DD Green2
150Ninety One Bombay 26" M.S DD Grey1
151Ninety One Drago 29" S/S DD Black Grey 1
152Ninety One Skull Rider 26" SS Dual Disk - Black Yellow1
153Ninety One Tokyo 26" M.S DD Black Red1
154Old Stock - Hero BMX Rotter 20" 2
155Old Stock - Hero RX2 26" 9
156Old Stock - BSA BAZooka 26"10
157Old Stock - BSA Reflex 26" 18
158Old Stock - Hercules Atom 26" Green6
159Raleigh Green Gents Standard 22 Gents6
160Riyoko Elite 24"4
161Riyoko Elite 26" 6
162Riyoko Nicky 24" 8
163Roadeo A-75 26" 21 SP D/D Black Neon Red1
164Roadeo A-75 26" 21 SP D/D Lapis Blue Neon Yellow4
165Roadeo Fugitive 27.5 21 SP DD Antiq Blue1
166Roadeo Fugitive 29" 21 SP DD Matt Black2
167Roadeo NFS 27.5" 21 SP D/D Black Neon Red1
168Roadeo NFS 27.5" 21 SP D/D Black Neon Yellow2
169Roadeo NFS 29" 21 SP D/D Black Neon Green2
170Rockstar 14" Red2
171Space Varder 16" Orange Ivory White4
172Space Varder 16" S.Purple4
173Space Varder 20" Sports Purple Hot pink4
174Space Varder 20"Smart Red8
175Top Trak Bull 20" Green2
176Top Trak Bull 20" Orange6
177Top Trak Challenger 2014
178Top Trak Floris 24" Blue2
179Top Trak Floris 26" Blue2
180Top Trak Floris 26" Pink4
181Top Trak Floris 26" Purple6
182Top Trak Fly Lady 24" Pink6
183Top Trak Fly Lady 24" Purple 2
184Top Trak Kelly 16" 10
185Top Trak Kelly 20" 8
186Top Trak Krooz 20" Blue6
187Top Trak Spike Pro 20" Green4
188Top Trak Spike Pro 20" Orange2
1897/27/2023BSA Ladybird Hazel 24" Sports Purple2
1907/27/2023Hercules Sparx 2.0 RF 24" Black4
1917/27/2023Hercules Streetcat Pro R/F 24" (DB - Rim) Black Green2
1927/27/2023Hercules Tussle 26" RF Red2
1937/27/2023Hercules Trailfire R/F DX2 26" Magic Blue F.Orange2
1947/27/2023Hercules Wildrock IC R/F 26" Glossy Black 2
1957/27/2023Hero Colt 26" Black Red1
1967/27/2023Hero Colt 26" Black Blue1
1977/27/2023Hercules Streetcat Pro IC DX2 24" Black A.Green2
1987/27/2023Hercules Streetcat Pro HT DX2 26" Black A.Green2
1997/27/2023BSA Ladybird Diana 26" Sea Foam Green2
2007/27/2023Hercules Streetcat Pro HT DX2 26" Black A.Green2
2017/27/2023Hercules Streetrider ZX 26" Black A.Green2
2027/27/2023Cosmic Level Tigo 29" SS ST FS Red1
2037/27/2023Cosmic Jolt 29" Yellow Blue1
2047/27/2023Ninety One Drago 27.5" S/S DD Black Red1
2057/27/2023Ninety One Skull Rider 26" SS Dual Disk - Black Red1
2067/27/2023BSA Ladybird Hazel 26" Sports Purple2
2077/27/2023Hercules Trailfire HT 26" Matt. Black N.Green2
2087/27/2023Hercules Kombat RF - 26" Black2
2097/27/2023Hercules Standard Black2
2107/27/2023Hercules Streetcat Pro 24" Matt. Black Red1
2117/27/2023Cosmic Comet 26" SS Silver Red1
2127/27/2023Hercules Street Rider RF 26" Victor Blue1
2137/27/2023Cosmic Maze 27.5" SS ST FS1
2147/27/2023Cosmic Maze 29" SS ST FS2
2157/27/2023BSA Ladybird Diva 26" Sports Purple2
2167/27/2023BSA Ladybird Summer 26" Victor Blue2
2177/27/2023Cosmic Comet 29" SS ST FS Grey2
2187/27/2023Hercules FX - 100 DX2 3.0 26" SS Matt Black N.Orange1
2197/27/2023Cosmic Hulk 29" SS ST FS Silver Red1
2207/27/2023BSA Champ Orbit 20" Cel. Blue3
2217/27/2023Top Trak Challenger 201
2227/27/2023Ninety One Tokyo 27.5" SS DD Grey Yellow2
2237/27/2023BSA Agent X 20" Blue Pink2
2247/27/2023BSA Go Biking 20" 2
2257/27/2023BSA Ladybird Hazel 26" Sports Purple2
2267/27/2023Ninety One Alpha Serenity 26" Black / Pink2
2277/27/2023Ninety One Tokyo 27.5" SS DD Black Red2
2288/2/2023BSA Ladybird Hazel 26" Pearl Pin k12
2298/2/2023BSA Ladybird Hazel 26" Black20
2308/2/2023BSA Ladybird Splash 26" B.Pink Pearl White4
2318/2/2023BSA Ladybird Sofia 26" Pearl Pink8
2328/2/2023Montra Unplugged FX SS 27.5 G Neon Green1
2338/4/2023BSA Ladybird Summer 26" Victor Blue20
234BSA Ladybird Shine 26" Pearl Pink8
235BSA Ladybird Hazel 26" Sports Purple8
236Hercules Sparx 2.0 RF 24" Black6
237Hercules Tussle 26" RF Red8
238Hercules Sparx 2.0 RF 26" Victor Blue4
239BSA Ladybird Diana 24" Sea foam Green6
240BSA Trooper 20" Green Golden Yellow2
241BSA Wildcat 20" Cyan Green2
242BSA Platoon FX-20 " Trooper Grey2
243BSA Ladybird Valerie 26" Scarlet Red1
244Hercules Streetcat Pro 26" Tropper Grey8
245BSA Kinder 14 Ruby Pink2
246BSA Kinder 12" Victor Blue2
247BSA Roamer 12" Citron Green6
248BSA Champ 14" Seafoam Green4
249BSA Champ 12" Seafoam Green4
250Hercules Wildrock IC RF 26" Black Red2
251Hercules Bazooka 2.0 IC 26" Black Blue Yellow8
252Hercules Wildrock 26" HT Black Red8
253BSA Go Biking 14" Red and Grey4
254BSA Ladybird Diva 26" Sports Purple10
255Hercules Wildrock IC RF 24" Black Red2
256BSA Ladybird Diva 26" Doodle Pink10
2578/10/2023BSA Ladybird Summer 26" Pink10
258Hercules Street Rider ZX 26 " Black Neon Red10
259Hercules Dynamite ZX 24" Black Acid Green4
260Hercules Trailfire R/F 26" Ivory White2
261Hercules Kombat R/F 24" Black6
262Hercules Standard Green12
263BSA Ladybird Valencia 26" Ballet Pink2
264BSA Platoon SS 20" Trooper Grey with Blue2
265Hercules Streetcat Pro IC RF 26" Black 8
266Hercules Streetcat Pro HT IC DX2 26" Black A.Green8
267Hercules Wildrock IC RF 26" Black Red6
268BSA Ladybird Cindy 26" Blue Berry Blue2
269Hercules Wildrock IC RF 24" Black Twitter Blue2
270Hercules Bazooka 2.0 RF 24" Black Rubine Red2
271Top Track Ride 20"12
272Hercules Standard Black12
273Hercules Sparx 2.0 R/F 26" Black8
274BSA Champ 14" Victor Blue 2
275BSA Ladybird Cindy 26" Doodle Pink2
Sheet1


Sheet2 Data:
Compare between 2 Sheets.xlsm
AB
1BSA Agent X 20" Blue Pink4
2BSA Champ 16" Green2
3BSA Champ 16" Red4
4BSA Champ 16" Victor Blue2
5BSA Champ 20" Red2
6BSA Champ 20" Sea. Foam Green8
7BSA Champ 20" V.Blue6
8BSA Champ Orbit 20" Cel. Blue12
9BSA Champ Orbit 20" Red6
10BSA Daisy 14" Sky Blue2
11BSA Diana 24" Doodle Pink8
12BSA Doodle 20" Victor Blue4
13BSA Go 20" Matt. Black Neon Orange2
14BSA Go Biking 14" Victor Blue Grey2
15BSA Go Biking 16" Ferrari Red & Led Grey2
16BSA Hazel 24" Sports Purple12
17BSA Hazel 24" Pearl Pink12
18BSA Kinder 14" Blue2
19BSA Kinder 14" Red2
20BSA Kinder 16" Red2
21BSA Kinder 16" Sunflower Yellow6
22BSA Kinder 16" Victor Blue4
23BSA Kinder 20" Doodle Pink4
24BSA Kinder 20" Lawn Green2
25BSA Kinder 20" S.Red2
26BSA Kinder 20" Sunflower Yellow 6
27BSA Kinder 20" Victor Blue6
28BSA Ladybird Diana 26" Doodle Pink22
29BSA Ladybird Diana 26" Sea Foam Green4
30BSA Ladybird Diva 26" Clestial Blue6
31BSA Ladybird Diva 26" Sports Purple2
32BSA Ladybird Hazel 26" Artic .Blue2
33BSA Ladybird Hazel 26" Pearl Pin k4
34BSA Ladybird Hazel 26" Sports Purple6
35BSA Ladybird Shine 26" Citron Green8
36BSA Ladybird Shine 26" Clestial Blue12
37BSA Ladybird Shine 26" Pearl Pink2
38BSA Ladybird Sofia 26" Aqua Marine Blue M.Pink6
39BSA Ladybird Sofia 26" Larosa Pink Macron Pink2
40BSA Ladybird Summer 26" Pink4
41BSA Roamer 12" Red 2
42BSA Roamer 16" Citron Green2
43BSA Roamer 16" Metalic Blue2
44BSA Roamer 16" Metalic Red4
45BSA Roamer 20" Green4
46BSA Roamer 20" Red16
47BSA Shine 24" Pink20
48BSA Toonz 16" Pink2
49BSA Trooper 20" Green Golden Yellow2
50Cosmic Comet 26" Black Orange1
51Cosmic Comet 26" Blue Yellow1
52Cosmic Comet 29" Black Blue1
53Cosmic Fern 24" Pink1
54Cosmic Jade 16" Pink1
55Cosmic Jade 16" Violet2
56Cosmic Jolt 29" Yellow Blue1
57Cosmic Level 9160 27.5 Silver Red1
58Hecules Streetcat Pro 24" Matt. Black Red6
59Hecules Wildrock IC RF 26" Black Red2
60Hercule Photon Speed Star 26" Matt. Black 2
61Hercules A-220 HT DX2 29" SS Matt. Balck Twitter Blue4
62Hercules A-220 HT DX2 27.5" Matt. Black Frame Orange3
63Hercules Atom ZX - 26" Black Orange2
64Hercules Brut 2.0 ZX - 26" Matt. Black A. Green2
65Hercules Captain EX - Gents RB2
66Hercules Captain EX - Ladies RB2
67Hercules FX - 200 IC 26" Victor Blue Matt. Black2
68Hercules Kombat R/F 24" Black4
69Hercules Kombat RF - 26" Black4
70Hercules Kombat RF - 26" Red4
71Hercules Kombat ZX - 26" Matt. Balack A.Green4
72Hercules Sparx 2.0 RF 24" Black6
73Hercules Sparx 2.0 RF 26" Victor Blue4
74Hercules Standard Green16
75Hercules Street Rider R/F 26" Black2
76Hercules Street Rider RF 24" Black2
77Hercules Street Rider RF 24" S.Red6
78Hercules Street Rider RF 26" Victor Blue8
79Hercules Streetcat IC HT DX2 26" Matt Black6
80Hercules Streetcat Pro 24" IC - Victor Blue6
81Hercules Streetcat Pro 26" Acid Green2
82Hercules Streetcat Pro 26" Tropper Grey2
83Hercules Streetcat Pro HT DX2 26" Black A.Green4
84Hercules Streetcat Pro IC 24" A.Green2
85Hercules Streetcat Pro R/F 24" (DB - Rim) Black Green4
86Hercules Streetrider R/F 24" Smart Red4
87Hercules Streetrider ZX 24" Smart Red Black2
88Hercules Streetrider ZX 26" Black A.Green6
89Hercules Trailfire HT 26" Ivory White6
90Hercules Trailfire HT 26" Matt. Black N.Green4
91Hercules Trailfire R/F DX2 26" Magic Blue F.Orange8
92Hercules Tussle 26" RF Black4
93Hercules Tussle 26" RF Red2
94Hercules Wayfinder IC HT DX2 26" Matt. Black2
95Hercules Wildrock IC HT 26" Glossy Black Twitter Blue2
96Hercules Wildrock IC R/F 26" Glossy Black 4
97Hercules Wildrock R/F 24" Black Twitter Blue4
98Hercules Wildrock R/F 26" Glossy Black 2
99Hero Jackoo 12" Red8
100Hero Blaze 16" Purple6
101Hero Blaze 16" Red2
102Hero Blaze 16" Yellow2
103Hero Bobcat 16" Black2
104Hero Bobcat 20" Red2
105Hero Boomer 16 Orange4
106Hero Boomer 16 Pink4
107Hero Boomer 16" Green2
108Hero Boomer 20" Orange2
109Hero Boomer 20" Pink2
110Hero Colt 26" Black2
111Hero Colt 26" Sky Blue2
112Hero Jackoo 1420
113Hero Jet Green Standard4
114Hero Miss India Velvet 26" Pink2
115Hero Rafale 26" Black4
116Hero Ride On 16" Green2
117Hero Ride On 16" Red4
118Hero Ride On 20" Green2
119Hero Ride On 20" Red4
120Hero Rock Star 16" Pink2
121Hero Rock Star 20" Red2
122Hero Rockstar 12" Green2
123Hero Rockstar 12" Pink4
124Hero Rockstar 12" Red2
125Hero Sting 16" IC Black4
126Hero Sting IC 20" Red2
127Hero Sundance 20" Red2
128Hero Sundancer 16" Pink4
129Hero Sundancer 20" Pink6
130Hero Urban Trail 26" SS Black2
131Hero Urban Trail 26" SS Blue2
132Hero Urban Trail 26" SS Red4
133Hero Whistle 16" Black2
134Hero Whistle 16" Red2
135Hero Whistle 16" Sky Blue2
136Hero Whistle 20" Black6
137Hero Whistle 20" Sky Blue2
138Hero Winner 16" Black2
139Hero Winner 16" Red 2
140Herules FX - 100 DX2 3.0 26" SS Matt Black N.Orange7
141Machcit Munich 700 x 35 C SS Med. Pac. Blue5
142Machcity 26" S/S Med Forest Green17
143Machcity Munich 700 X 35 C 21 SP Med. Pac. Blue1
144Machcity S/S 26" Medium Victor Blue25
145Montra Downtown 700 C Med. Neon Yellow Black2
146Montra DTR 20" 6 SP Lava Red with Black2
147Montra DTR 20" 6 SP Red with Black Graphics1
148Ninety One Bombay 26" M.S DD Black Red2
149Ninety One Bombay 26" M.S DD Green2
150Ninety One Bombay 26" M.S DD Grey1
151Ninety One Drago 29" S/S DD Black Grey 1
152Ninety One Skull Rider 26" SS Dual Disk - Black Yellow1
153Ninety One Tokyo 26" M.S DD Black Red1
154Old Stock - Hero BMX Rotter 20" 2
155Old Stock - Hero RX2 26" 9
156Old Stock - BSA BAZooka 26"10
157Old Stock - BSA Reflex 26" 18
158Old Stock - Hercules Atom 26" Green6
159Raleigh Green Gents Standard 22 Gents6
160Riyoko Elite 24"4
161Riyoko Elite 26" 6
162Riyoko Nicky 24" 8
163Roadeo A-75 26" 21 SP D/D Black Neon Red1
164Roadeo A-75 26" 21 SP D/D Lapis Blue Neon Yellow4
165Roadeo Fugitive 27.5 21 SP DD Antiq Blue1
166Roadeo Fugitive 29" 21 SP DD Matt Black2
167Roadeo NFS 27.5" 21 SP D/D Black Neon Red1
168Roadeo NFS 27.5" 21 SP D/D Black Neon Yellow2
169Roadeo NFS 29" 21 SP D/D Black Neon Green2
170Rockstar 14" Red2
171Space Varder 16" Orange Ivory White4
172Space Varder 16" S.Purple4
173Space Varder 20" Sports Purple Hot pink4
174Space Varder 20"Smart Red8
175Top Trak Bull 20" Green2
176Top Trak Bull 20" Orange6
177Top Trak Challenger 2014
178Top Trak Floris 24" Blue2
179Top Trak Floris 26" Blue2
180Top Trak Floris 26" Pink4
181Top Trak Floris 26" Purple6
182Top Trak Fly Lady 24" Pink6
183Top Trak Fly Lady 24" Purple 2
184Top Trak Kelly 16" 10
185Top Trak Kelly 20" 8
186Top Trak Krooz 20" Blue6
187Top Trak Spike Pro 20" Green4
188Top Trak Spike Pro 20" Orange2
189Top Track Ride 20"12
Sheet2


Expected Output:
Compare between 2 Sheets.xlsm
ABCDEFGHI
1Missing Values in Sheet2Duplicate Values in Sheet1Duplicate Values2
2DateItemQuantityDateItemQuantityDateItemQuantity
3BSA Ladybird Diana 24" Doodle PinkBSA Diana 24" Doodle PinkBSA Agent X 20" Blue Pink
4BSA Ladybird Hazel 24" Sports PurpleBSA Hazel 24" Sports PurpleBSA Champ 16" Green
5BSA Ladybird Hazel 24" Pearl PinkBSA Hazel 24" Pearl PinkBSA Champ 16" Red
6Hercules Streetcat Pro 24" Matt. Black RedHecules Streetcat Pro 24" Matt. Black RedBSA Champ 16" Victor Blue
7Hercules Wildrock IC RF 26" Black RedHecules Wildrock IC RF 26" Black RedBSA Champ 20" Red
8Hercules Photon Speed Star 26" Matt. Black Hercule Photon Speed Star 26" Matt. Black BSA Champ 20" Sea. Foam Green
9Hercules FX - 100 DX2 3.0 26" SS Matt Black N.OrangeHerules FX - 100 DX2 3.0 26" SS Matt Black N.OrangeBSA Champ 20" V.Blue
10Machcity Munich 700 x 35 C SS Med. Pac. BlueMachcit Munich 700 x 35 C SS Med. Pac. BlueBSA Champ Orbit 20" Cel. Blue
11Hero Colt 26" Black RedBSA Champ Orbit 20" Red
12Hero Colt 26" Black BlueBSA Daisy 14" Sky Blue
13Hercules Streetcat Pro IC DX2 24" Black A.GreenBSA Doodle 20" Victor Blue
14Cosmic Level Tigo 29" SS ST FS RedBSA Go 20" Matt. Black Neon Orange
15Ninety One Drago 27.5" S/S DD Black RedBSA Go Biking 14" Victor Blue Grey
16Ninety One Skull Rider 26" SS Dual Disk - Black RedBSA Go Biking 16" Ferrari Red & Led Grey
17Hercules Standard BlackBSA Kinder 14" Blue
18Cosmic Comet 26" SS Silver RedBSA Kinder 14" Red
19Cosmic Maze 27.5" SS ST FSBSA Kinder 16" Red
20Cosmic Maze 29" SS ST FSBSA Kinder 16" Sunflower Yellow
21BSA Ladybird Summer 26" Victor BlueBSA Kinder 16" Victor Blue
22Cosmic Comet 29" SS ST FS GreyBSA Kinder 20" Doodle Pink
23Cosmic Hulk 29" SS ST FS Silver RedBSA Kinder 20" Lawn Green
24Ninety One Tokyo 27.5" SS DD Grey YellowBSA Kinder 20" S.Red
25BSA Go Biking 20" BSA Kinder 20" Sunflower Yellow
26Ninety One Alpha Serenity 26" Black / PinkBSA Kinder 20" Victor Blue
27Ninety One Tokyo 27.5" SS DD Black RedBSA Ladybird Diana 26" Doodle Pink
28BSA Ladybird Hazel 26" BlackBSA Ladybird Diana 26" Sea Foam Green
29BSA Ladybird Splash 26" B.Pink Pearl WhiteBSA Ladybird Diva 26" Clestial Blue
30BSA Ladybird Sofia 26" Pearl PinkBSA Ladybird Diva 26" Sports Purple
31Montra Unplugged FX SS 27.5 G Neon GreenBSA Ladybird Hazel 26" Artic .Blue
32BSA Ladybird Diana 24" Sea foam GreenBSA Ladybird Hazel 26" Pearl Pin k
33BSA Wildcat 20" Cyan GreenBSA Ladybird Hazel 26" Sports Purple
34BSA Platoon FX-20 " Trooper GreyBSA Ladybird Shine 26" Citron Green
35BSA Ladybird Valerie 26" Scarlet RedBSA Ladybird Shine 26" Clestial Blue
36BSA Kinder 14 Ruby PinkBSA Ladybird Shine 26" Pearl Pink
37BSA Kinder 12" Victor BlueBSA Ladybird Sofia 26" Aqua Marine Blue M.Pink
38BSA Roamer 12" Citron GreenBSA Ladybird Sofia 26" Larosa Pink Macron Pink
39BSA Champ 14" Seafoam GreenBSA Ladybird Summer 26" Pink
40BSA Champ 12" Seafoam GreenBSA Roamer 12" Red
41Hercules Bazooka 2.0 IC 26" Black Blue YellowBSA Roamer 16" Citron Green
42Hercules Wildrock 26" HT Black RedBSA Roamer 16" Metalic Blue
43BSA Go Biking 14" Red and GreyBSA Roamer 16" Metalic Red
44Hercules Wildrock IC RF 24" Black RedBSA Roamer 20" Green
45BSA Ladybird Diva 26" Doodle PinkBSA Roamer 20" Red
46Hercules Street Rider ZX 26 " Black Neon RedBSA Shine 24" Pink
47Hercules Dynamite ZX 24" Black Acid GreenBSA Toonz 16" Pink
48Hercules Trailfire R/F 26" Ivory WhiteBSA Trooper 20" Green Golden Yellow
49BSA Ladybird Valencia 26" Ballet PinkCosmic Comet 26" Black Orange
50BSA Platoon SS 20" Trooper Grey with BlueCosmic Comet 26" Blue Yellow
51Hercules Streetcat Pro IC RF 26" Black Cosmic Comet 29" Black Blue
52Hercules Streetcat Pro HT IC DX2 26" Black A.GreenCosmic Fern 24" Pink
53BSA Ladybird Cindy 26" Blue Berry BlueCosmic Jade 16" Pink
54Hercules Wildrock IC RF 24" Black Twitter BlueCosmic Jade 16" Violet
55Hercules Bazooka 2.0 RF 24" Black Rubine RedCosmic Jolt 29" Yellow Blue
56Hercules Sparx 2.0 R/F 26" BlackCosmic Level 9160 27.5 Silver Red
57BSA Champ 14" Victor Blue Hercules A-220 HT DX2 29" SS Matt. Balck Twitter Blue
58BSA Ladybird Cindy 26" Doodle PinkHercules A-220 HT DX2 27.5" Matt. Black Frame Orange
59Hercules Atom ZX - 26" Black Orange
60Hercules Brut 2.0 ZX - 26" Matt. Black A. Green
61Hercules Captain EX - Gents RB
62Hercules Captain EX - Ladies RB
63Hercules FX - 200 IC 26" Victor Blue Matt. Black
64Hercules Kombat R/F 24" Black
65Hercules Kombat RF - 26" Black
66Hercules Kombat RF - 26" Red
67Hercules Kombat ZX - 26" Matt. Balack A.Green
68Hercules Sparx 2.0 RF 24" Black
69Hercules Sparx 2.0 RF 26" Victor Blue
70Hercules Standard Green
71Hercules Street Rider R/F 26" Black
72Hercules Street Rider RF 24" Black
73Hercules Street Rider RF 24" S.Red
74Hercules Street Rider RF 26" Victor Blue
75Hercules Streetcat IC HT DX2 26" Matt Black
76Hercules Streetcat Pro 24" IC - Victor Blue
77Hercules Streetcat Pro 26" Acid Green
78Hercules Streetcat Pro 26" Tropper Grey
79Hercules Streetcat Pro HT DX2 26" Black A.Green
80Hercules Streetcat Pro IC 24" A.Green
81Hercules Streetcat Pro R/F 24" (DB - Rim) Black Green
82Hercules Streetrider R/F 24" Smart Red
83Hercules Streetrider ZX 24" Smart Red Black
84Hercules Streetrider ZX 26" Black A.Green
85Hercules Trailfire HT 26" Ivory White
86Hercules Trailfire HT 26" Matt. Black N.Green
87Hercules Trailfire R/F DX2 26" Magic Blue F.Orange
88Hercules Tussle 26" RF Black
89Hercules Tussle 26" RF Red
90Hercules Wayfinder IC HT DX2 26" Matt. Black
91Hercules Wildrock IC HT 26" Glossy Black Twitter Blue
92Hercules Wildrock IC R/F 26" Glossy Black
93Hercules Wildrock R/F 24" Black Twitter Blue
94Hercules Wildrock R/F 26" Glossy Black
95Hero Jackoo 12" Red
96Hero Blaze 16" Purple
97Hero Blaze 16" Red
98Hero Blaze 16" Yellow
99Hero Bobcat 16" Black
100Hero Bobcat 20" Red
101Hero Boomer 16 Orange
102Hero Boomer 16 Pink
103Hero Boomer 16" Green
104Hero Boomer 20" Orange
105Hero Boomer 20" Pink
106Hero Colt 26" Black
107Hero Colt 26" Sky Blue
108Hero Jackoo 14
109Hero Jet Green Standard
110Hero Miss India Velvet 26" Pink
111Hero Rafale 26" Black
112Hero Ride On 16" Green
113Hero Ride On 16" Red
114Hero Ride On 20" Green
115Hero Ride On 20" Red
116Hero Rock Star 16" Pink
117Hero Rock Star 20" Red
118Hero Rockstar 12" Green
119Hero Rockstar 12" Pink
120Hero Rockstar 12" Red
121Hero Sting 16" IC Black
122Hero Sting IC 20" Red
123Hero Sundance 20" Red
124Hero Sundancer 16" Pink
125Hero Sundancer 20" Pink
126Hero Urban Trail 26" SS Black
127Hero Urban Trail 26" SS Blue
128Hero Urban Trail 26" SS Red
129Hero Whistle 16" Black
130Hero Whistle 16" Red
131Hero Whistle 16" Sky Blue
132Hero Whistle 20" Black
133Hero Whistle 20" Sky Blue
134Hero Winner 16" Black
135Hero Winner 16" Red
136Machcity 26" S/S Med Forest Green
137Machcity Munich 700 X 35 C 21 SP Med. Pac. Blue
138Machcity S/S 26" Medium Victor Blue
139Montra Downtown 700 C Med. Neon Yellow Black
140Montra DTR 20" 6 SP Lava Red with Black
141Montra DTR 20" 6 SP Red with Black Graphics
142Ninety One Bombay 26" M.S DD Black Red
143Ninety One Bombay 26" M.S DD Green
144Ninety One Bombay 26" M.S DD Grey
145Ninety One Drago 29" S/S DD Black Grey
146Ninety One Skull Rider 26" SS Dual Disk - Black Yellow
147Ninety One Tokyo 26" M.S DD Black Red
148Old Stock - Hero BMX Rotter 20"
149Old Stock - Hero RX2 26"
150Old Stock - BSA BAZooka 26"
151Old Stock - BSA Reflex 26"
152Old Stock - Hercules Atom 26" Green
153Raleigh Green Gents Standard 22 Gents
154Riyoko Elite 24"
155Riyoko Elite 26"
156Riyoko Nicky 24"
157Roadeo A-75 26" 21 SP D/D Black Neon Red
158Roadeo A-75 26" 21 SP D/D Lapis Blue Neon Yellow
159Roadeo Fugitive 27.5 21 SP DD Antiq Blue
160Roadeo Fugitive 29" 21 SP DD Matt Black
161Roadeo NFS 27.5" 21 SP D/D Black Neon Red
162Roadeo NFS 27.5" 21 SP D/D Black Neon Yellow
163Roadeo NFS 29" 21 SP D/D Black Neon Green
164Rockstar 14" Red
165Space Varder 16" Orange Ivory White
166Space Varder 16" S.Purple
167Space Varder 20" Sports Purple Hot pink
168Space Varder 20"Smart Red
169Top Trak Bull 20" Green
170Top Trak Bull 20" Orange
171Top Trak Challenger 20
172Top Trak Floris 24" Blue
173Top Trak Floris 26" Blue
174Top Trak Floris 26" Pink
175Top Trak Floris 26" Purple
176Top Trak Fly Lady 24" Pink
177Top Trak Fly Lady 24" Purple
178Top Trak Kelly 16"
179Top Trak Kelly 20"
180Top Trak Krooz 20" Blue
181Top Trak Spike Pro 20" Green
182Top Trak Spike Pro 20" Orange
183Top Track Ride 20"
Expected Result
 
Do you want to list every occurence of the duplicated item from the source sheet? The reason I ask is that, using Hercules Sparx 2.0 RF 24" Black as an example, there are 3 instances of that item on sheet 1 - only the second one has a date, the first and third instance have quantities of 6, the second has a quantity of 4. Which instance would you want, or all three?
Hello Kevin,

For multiple occurrences like that, I want to get all three matches if possible.
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Like this?
QuillPet.xlsm
ABCDEFGHIJK
1Missing values in sheet 2Duplicate values in sheet 1Duplicate values in sheet 2
2Source RowItemQuantitySource RowDateItemQuantitySource RowDateItemQuantity
Expected Result
 
Upvote 0
Like this?
QuillPet.xlsm
ABCDEFGHIJK
1Missing values in sheet 2Duplicate values in sheet 1Duplicate values in sheet 2
2Source RowItemQuantitySource RowDateItemQuantitySource RowDateItemQuantity
Expected Result
yes, it would be much better. Also, please do not forget to show the Date and Item for each report in the report sheet if there is a date and quantity in the source sheets.
 
Upvote 0
I thought it more logical to change the column order to this. Please try it on a copy of your workbook. Could do with tidying up, but try it first.
VBA Code:
Option Explicit
Sub Compare_2_Lists_V2()
    Application.ScreenUpdating = False
    Dim ws1 As Worksheet, ws2 As Worksheet, ws3 As Worksheet, LRow As Long
    Set ws1 = Worksheets("Sheet1")              '<-- *** Change sheet names to suit ***
    Set ws2 = Worksheets("Sheet2")
    Set ws3 = Worksheets("Expected Result")
    If ws1.AutoFilterMode Then ws1.AutoFilter.ShowAllData
    
    'Clear any existing results
    LRow = Application.Max(ws3.Cells.Find("*", , xlFormulas, , 1, 2).Row, 3)
    ws3.Range("A3:Z" & LRow).ClearContents
    
    'Get the data missing on sheet 2
    Dim a, b, c, d, x
    Dim i As Long, j As Long
    a = ws1.Range("B1", ws1.Cells(Rows.Count, "B").End(xlUp))
    b = ws2.Range("A1", ws2.Cells(Rows.Count, "A").End(xlUp))
    ReDim c(1 To UBound(a, 1), 1 To 1)
    With CreateObject("scripting.dictionary")
        .comparemode = 1
        For i = 1 To UBound(a, 1)
            .Item(a(i, 1)) = Empty
        Next i
        For i = 1 To UBound(b, 1)
            If Not .exists(b(i, 1)) Then
                j = j + 1
                c(j, 1) = b(i, 1)
            End If
        Next i
    End With
    ws3.Range("A3").Resize(j).Value = c
    
    'Get the duplicates on sheet 1
    With ws1
        .Activate
        .Rows(1).Insert
        .Range("A1:E1").Value = Array("Date", "Item", "Qty", "Row", "Count")
    End With
    LRow = ws1.Cells(Rows.Count, "B").End(xlUp).Row
    With ws1.Range("D2:D" & LRow)
        .Value = Evaluate("Row(" & .Address(, , , 1) & ")")
    End With
    With ws1.Range("E2:E" & LRow)
        .Value = Evaluate("Countif(B2:B" & LRow & "," & .Offset(, -3).Address(, , , 1) & ")")
    End With
    
    With ws1.Range("A1").CurrentRegion
        .AutoFilter 5, ">1"
        If .SpecialCells(xlCellTypeVisible).Address <> .Rows(1).Address Then
            .Offset(1).Resize(, 4).Copy ws3.Range("D3")
        End If
        .AutoFilter
        .Range("D:E").ClearContents
        .Rows(1).Delete
    End With
    
    'Get the duplicates on sheet 2 (if any) and the qty/row on the missing from sheet 2
    With ws2
        .Activate
        .Rows(1).Insert
        .Range("A1:D1").Value = Array("Item", "Qty", "Row", "Count")
    End With
    LRow = ws2.Cells(Rows.Count, "A").End(xlUp).Row
    With ws2.Range("C2:C" & LRow)
        .Value = Evaluate("Row(" & .Address(, , , 1) & ")")
    End With
    With ws2.Range("D2:D" & LRow)
        .Value = Evaluate("Countif(A2:A" & LRow & "," & .Offset(, -3).Address(, , , 1) & ")")
    End With
    With ws2.Range("A1").CurrentRegion
        .AutoFilter 4, ">1"
        If .SpecialCells(xlCellTypeVisible).Address <> .Rows(1).Address Then
            .Offset(1).Resize(, 3).Copy ws3.Range("H3")
        End If
        .AutoFilter
        LRow = Application.Max(ws2.Cells(Rows.Count, "A").End(xlUp).Row, 2)
        d = ws2.Range("A2:D" & LRow)
        x = ws3.Range("A3:C" & ws3.Cells(Rows.Count, "A").End(xlUp).Row)
        For i = 1 To UBound(x, 1)
            For j = LBound(d, 1) To UBound(d, 1)
                If d(j, 1) = x(i, 1) Then x(i, 2) = d(j, 2): x(i, 3) = d(j, 3)
            Next j
        Next i
        ws3.Range("A3").Resize(UBound(x, 1), 3).Value = x
        .Range("C:D").ClearContents
        .Rows(1).Delete
    End With
    Application.Goto ws3.Cells(1), 1
    Application.ScreenUpdating = True
End Sub

Results in this:
QuillPet.xlsm
ABCDEFGHIJ
1Missing values in sheet 2Duplicate values in sheet 1Duplicate values in sheet 2
2ItemQuantitySource RowDateItemQuantitySource RowItemQuantitySource Row
3BSA Diana 24" Doodle Pink812BSA Agent X 20" Blue Pink42
4BSA Hazel 24" Sports Purple1217BSA Champ Orbit 20" Cel. Blue129
5BSA Hazel 24" Pearl Pink1218BSA Ladybird Hazel 24" Sports Purple1017
6Hecules Streetcat Pro 24" Matt. Black Red659BSA Ladybird Diana 26" Sea Foam Green430
7Hecules Wildrock IC RF 26" Black Red260BSA Ladybird Diva 26" Sports Purple232
8Hercule Photon Speed Star 26" Matt. Black 261BSA Ladybird Hazel 26" Pearl Pin k434
9Herules FX - 100 DX2 3.0 26" SS Matt Black N.Orange7141BSA Ladybird Hazel 26" Sports Purple635
10Machcit Munich 700 x 35 C SS Med. Pac. Blue5142BSA Ladybird Shine 26" Pearl Pink238
11BSA Ladybird Summer 26" Pink441
12BSA Trooper 20" Green Golden Yellow250
13Cosmic Jolt 29" Yellow Blue157
14Hercules Streetcat Pro 24" Matt. Black Red659
15Hercules Wildrock IC RF 26" Black Red260
16Hercules Kombat R/F 24" Black469
17Hercules Kombat RF - 26" Black470
18Hercules Sparx 2.0 RF 24" Black673
19Hercules Sparx 2.0 RF 26" Victor Blue474
20Hercules Standard Green1675
21Hercules Street Rider RF 26" Victor Blue879
22Hercules Streetcat Pro 26" Tropper Grey283
23Hercules Streetcat Pro HT DX2 26" Black A.Green484
24Hercules Streetcat Pro R/F 24" (DB - Rim) Black Green486
25Hercules Streetrider ZX 26" Black A.Green689
26Hercules Trailfire HT 26" Matt. Black N.Green491
27Hercules Trailfire R/F DX2 26" Magic Blue F.Orange892
28Hercules Tussle 26" RF Red294
29Hercules Wildrock IC R/F 26" Glossy Black 497
30Hercules FX - 100 DX2 3.0 26" SS Matt Black N.Orange7141
31Top Trak Challenger 2014178
327/27/2023BSA Ladybird Hazel 24" Sports Purple2190
337/27/2023Hercules Sparx 2.0 RF 24" Black4191
347/27/2023Hercules Streetcat Pro R/F 24" (DB - Rim) Black Green2192
357/27/2023Hercules Tussle 26" RF Red2193
367/27/2023Hercules Trailfire R/F DX2 26" Magic Blue F.Orange2194
377/27/2023Hercules Wildrock IC R/F 26" Glossy Black 2195
387/27/2023Hercules Streetcat Pro HT DX2 26" Black A.Green2199
397/27/2023BSA Ladybird Diana 26" Sea Foam Green2200
407/27/2023Hercules Streetcat Pro HT DX2 26" Black A.Green2201
417/27/2023Hercules Streetrider ZX 26" Black A.Green2202
427/27/2023Cosmic Jolt 29" Yellow Blue1204
437/27/2023BSA Ladybird Hazel 26" Sports Purple2207
447/27/2023Hercules Trailfire HT 26" Matt. Black N.Green2208
457/27/2023Hercules Kombat RF - 26" Black2209
467/27/2023Hercules Standard Black2210
477/27/2023Hercules Streetcat Pro 24" Matt. Black Red1211
487/27/2023Hercules Street Rider RF 26" Victor Blue1213
497/27/2023BSA Ladybird Diva 26" Sports Purple2216
507/27/2023BSA Ladybird Summer 26" Victor Blue2217
517/27/2023Hercules FX - 100 DX2 3.0 26" SS Matt Black N.Orange1219
527/27/2023BSA Champ Orbit 20" Cel. Blue3221
537/27/2023Top Trak Challenger 201222
547/27/2023BSA Agent X 20" Blue Pink2224
557/27/2023BSA Ladybird Hazel 26" Sports Purple2226
568/02/2023BSA Ladybird Hazel 26" Pearl Pin k12229
578/04/2023BSA Ladybird Summer 26" Victor Blue20234
58BSA Ladybird Shine 26" Pearl Pink8235
59BSA Ladybird Hazel 26" Sports Purple8236
60Hercules Sparx 2.0 RF 24" Black6237
61Hercules Tussle 26" RF Red8238
62Hercules Sparx 2.0 RF 26" Victor Blue4239
63BSA Trooper 20" Green Golden Yellow2241
64Hercules Streetcat Pro 26" Tropper Grey8245
65Hercules Wildrock IC RF 26" Black Red2251
66BSA Ladybird Diva 26" Sports Purple10255
678/10/2023BSA Ladybird Summer 26" Pink10258
68Hercules Kombat R/F 24" Black6262
69Hercules Standard Green12263
70Hercules Wildrock IC RF 26" Black Red6268
71Hercules Standard Black12273
72
Expected Result
 
Upvote 0
I thought it more logical to change the column order to this. Please try it on a copy of your workbook. Could do with tidying up, but try it first
Thank you very much for the VBA code. I am really impressed that you have put much dedication into this problem. Much much appreciation.

There is a slight misunderstanding but it needs to be dealt with. The first columns of the output should be the missing values in Sheet2. i.e. values that are in Sheet1 but not in Sheet2. So, we can use 4 columns and enter every single missing value and the row number of Items in the source sheet. Again, we use 4 columns for duplicate values in Sheet1 and enter every duplicate value of source Sheet1 and the row number of Items if any. Afterward, 4 columns for duplicate values in Sheet2 in the same way. Please, modify the code to do this.
 
Upvote 0
Thank you very much for the VBA code. I am really impressed that you have put much dedication into this problem. Much much appreciation.

There is a slight misunderstanding but it needs to be dealt with. The first columns of the output should be the missing values in Sheet2. i.e. values that are in Sheet1 but not in Sheet2. So, we can use 4 columns and enter every single missing value and the row number of Items in the source sheet. Again, we use 4 columns for duplicate values in Sheet1 and enter every duplicate value of source Sheet1 and the row number of Items if any. Afterward, 4 columns for duplicate values in Sheet2 in the same way. Please, modify the code to do this.
I don't follow you, could you show a mock up of your expected outcomes using the XL2BB add-in, then we'll both be on the same page. Tomorrow before I get to it.
 
Upvote 0
I don't follow you, could you show a mock up of your expected outcomes using the XL2BB add-in, then we'll both be on the same page. Tomorrow before I get to it.
Can you just modify the part where the code will find the missing values of Sheet1 that are not in Sheet2? i.e. Data that are in Sheet1 but not in Sheet2 will be in the expected result. The rest works perfectly for now.
 
Upvote 0
Thank you very much for the VBA code. I am really impressed that you have put much dedication into this problem. Much much appreciation.

There is a slight misunderstanding but it needs to be dealt with. The first columns of the output should be the missing values in Sheet2. i.e. values that are in Sheet1 but not in Sheet2. So, we can use 4 columns and enter every single missing value and the row number of Items in the source sheet. Again, we use 4 columns for duplicate values in Sheet1 and enter every duplicate value of source Sheet1 and the row number of Items if any. Afterward, 4 columns for duplicate values in Sheet2 in the same way. Please, modify the code to do this.
Afterward, 4 columns for duplicate values in Sheet2 in the same way.
OK, I think I understand the first 2, but why 4 columns for the sheet 2 data when there isn't a date column on sheet 2 - only item, quantity & (added) row number?
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,194
Members
452,616
Latest member
intern444

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