Mismatched Return

BijanBorazjani

New Member
Joined
Oct 22, 2021
Messages
25
Office Version
  1. 365
Platform
  1. Windows
Good Morning,

I have 2 columns with Unit Numbers. One is a local inventory DB and the other is the Internet inventory DB. I need to compare the two columns of data, find if there are any mismatches, and have the unit number that is not matched inserted into a cell. I wouldn't mind using a VBA code if needed.

So to summarize:

A2:A1001 Data Set 1
D2:D1001 Data Set 2

K2:K1001 Unit Number is in Data Set 2 but not Data Set 1
O2:O1001 Unit Number is in Data Set 1 but not Data Set 2

Any help would be greatly appreciated!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Welcome to the MrExcel forum!

As you have Excel 365, it's pretty easy:

ME temp.xlsm
ADKO
1Data Set 1Data Set 2In 2 but not 1In 1 but not 2
2aeia
3bfjb
4cgkc
5dhld
6eim
7fjn
8gk
9hl
10m
11n
12
Sheet41
Cell Formulas
RangeFormula
K2:K7K2=FILTER(D2:D1001,(D2:D1001<>"")*(COUNTIF(A2:A1001,D2:D1001)=0))
O2:O5O2=FILTER(A2:A1001,(A2:A1001<>"")*(COUNTIF(D2:D1001,A2:A1001)=0))
Dynamic array formulas.
 
Upvote 0
Solution
Welcome to the MrExcel forum!

As you have Excel 365, it's pretty easy:

ME temp.xlsm
ADKO
1Data Set 1Data Set 2In 2 but not 1In 1 but not 2
2aeia
3bfjb
4cgkc
5dhld
6eim
7fjn
8gk
9hl
10m
11n
12
Sheet41
Cell Formulas
RangeFormula
K2:K7K2=FILTER(D2:D1001,(D2:D1001<>"")*(COUNTIF(A2:A1001,D2:D1001)=0))
O2:O5O2=FILTER(A2:A1001,(A2:A1001<>"")*(COUNTIF(D2:D1001,A2:A1001)=0))
Dynamic array formulas.
This was exactly what I needed! Thank you very much. My head and the wall appreciate it greatly.
 
Upvote 0
Welcome to the MrExcel forum!

As you have Excel 365, it's pretty easy:

ME temp.xlsm
ADKO
1Data Set 1Data Set 2In 2 but not 1In 1 but not 2
2aeia
3bfjb
4cgkc
5dhld
6eim
7fjn
8gk
9hl
10m
11n
12
Sheet41
Cell Formulas
RangeFormula
K2:K7K2=FILTER(D2:D1001,(D2:D1001<>"")*(COUNTIF(A2:A1001,D2:D1001)=0))
O2:O5O2=FILTER(A2:A1001,(A2:A1001<>"")*(COUNTIF(D2:D1001,A2:A1001)=0))
Dynamic array formulas.
OK so what would i do if i wanted to see if the units that are in both Set 1 and Set 2 have different Statuses? Below is a minisheet.

OKC Inventory Equipment 10-22-21.xlsm
ABCDEFGHIJKLMNOPQRSTUVW
1Branch Unit NumberBranch Unit StatusBranch LocationInfor Unit NumberInfor Unit StatusInfor LocationUnit Number Not In InforBranch Unit StatusBranch LocationUnit Number Not in BranchInfor Unit StatusInfor LocationUnit Status MismatchUnit NumberUnit LocationInfor StatusBranch Status
24050-0094ReadyMARENT2200-0275ReadyMARENTT53NCF17#CALC!
34050-1169ReadyMARENT2200-0304ReadyMARENT
44050-1189ReadyMARENT2200-0354ReadyMARENT
54050-1256ReadyMARENT2210-0036ReadyMARENT
64020-0025ReadyMARENT2210-0086HD1MARENT
7S03-092KReadyMARENT2220-0110ReadyMARENT
8S03-098KReadyMARENT2220-0146ReadyMARENT
9S03-123KReadyMARENT2220-0179ReadyMARENT
10S03-166KReadyMARENT2220-0197ReadyMARENT
11S03-215KReadyMARENT2220-0209ReadyMARENT
12S03-275KReadyMARENT2220-0218ReadyMARENT
13S2.5-041ReadyMARENT2220-0304ReadyMARENT
142200-0275ReadyMARENT2220-0348ReadyMARENT
152200-0304ReadyMARENT2220-0367ReadyMARENT
162200-0354ReadyMARENT2220-0412ReadyMARENT
17R13035Check InMARENT2220-0417Check InMARENT
18R13037ReservedMARENT2220-0436ReservedMARENT
19R13045ReservedMARENT2220-0444ReservedMARENT
20R13048Check InMARENT2220-0446Check InMARENT
21R13074Check InMARENT2220-0987Check InMARENT
22R13077ReservedMARENT2235-0078ReservedMARENT
23R13078ReservedMARENT2235-0083ReservedMARENT
24R13081ReservedMARENT2235-0084ReservedMARENT
25R13094ReservedMARENT2235-0085ReservedMARENT
26R14496ReadyMARENT2235-0087ReadyMARENT
27R14497ReadyMARENT2235-0089ReadyMARENT
28R14499ReadyMARENT2235-0091ReadyMARENT
29R14502Check InMARENT2235-0095Check InMARENT
30R14506Check InMARENT2235-0096Check InMARENT
31R14507ReservedMARENT2235-0098ReservedMARENT
32R14508ReservedMARENT2235-0099ReservedMARENT
33R14510ReservedMARENT2235-0101ReservedMARENT
34R14511ReservedMARENT3000-0011ReservedMARENT
35R14512ReservedMARENT3020-0004ReservedMARENT
36R14513ReservedMARENT3050-0010ReservedMARENT
37R14514ReadyMARENT3050-0021ReadyMARENT
38R14515ReservedMARENT3050-0033ReservedMARENT
392235-0078Check InMARENT4020-0025Check InMARENT
402235-0083ReadyMARENT4050-0094ReadyMARENT
412235-0084ReservedMARENT4050-1169ReservedMARENT
Inventory Comparison
Cell Formulas
RangeFormula
A2:A41A2=IFERROR(CELL("contents",Query1[@[Unit Number]]),"")
B2:B41B2=IFNA(VLOOKUP(A2,'Current Inventory'!$A$2:$C$1000,2,FALSE),"")
C2:C41C2=IFNA(VLOOKUP(A2,'Current Inventory'!$A$2:$C$1000,3,FALSE),"")
D2:D41D2=IF('Infor Import'!A2=0,"",(CELL("contents",'Infor Import'!A2)))
E2:E41E2=IFNA(VLOOKUP(A2,'Infor Import'!$A$2:$C$1001,2,FALSE),"")
F2:F41F2=IFNA(VLOOKUP(A2,'Infor Import'!$A$2:$C$1001,3,FALSE),"")
K2K2=FILTER(D2:D1001,(D2:D1001<>"")*(COUNTIF(A2:A1001,D2:D1001)=0))
O2O2=FILTER(A2:A1001,(A2:A1001<>"")*(COUNTIF(D2:D1001,A2:A1001)=0))
 
Upvote 0
I couldn't paste your mini-sheet, since it referenced other sheets, but see if this works for you:

ME temp.xlsm
ABCDEFGHIJKLMNOPQRSTUVW
1Branch Unit NumberBranch Unit StatusBranch LocationInfor Unit NumberInfor Unit StatusInfor LocationUnit Number Not in InforBranch Unit StatusBranch LocationUnit Number Not in BranchBranch Unit StatusBranch LocationUnit Status MismatchUnit NumberUnit LocationInfor StatusBranch Status
2axx1cReady10axx1iyy16d11HD1Ready
3bxx2dHD111bxx2jyy17e12ReservedCheck In
4cReady3eReserved12zxx9kyy18g14ReadyReserved
5dReady4fReady13lyy19h15ReadyCheck In
6eCheck In5gReady14
7fReady6hReady15
8gReserved7iyy16
9hCheck In8jyy17
10zxx9kyy18
11lyy19
12
13
Sheet42
Cell Formulas
RangeFormula
K2:M4K2=FILTER(A2:C20,(A2:A20<>"")*(COUNTIF(D2:D20,A2:A20)=0))
O2:Q5O2=FILTER(D2:F20,(D2:D20<>"")*(COUNTIF(A2:A20,D2:D20)=0))
T2:T5T2=FILTER(D2:D20,(D2:D20<>"")*(COUNTIF(A2:A20,D2:D20)*(COUNTIFS(A2:A20,D2:D20,B2:B20,E2:E20)=0)))
U2:U5U2=VLOOKUP(T2#,D2:F20,3,0)
V2:V5V2=VLOOKUP(T2#,D2:F20,2,0)
W2:W5W2=VLOOKUP(T2#,A2:C20,2,0)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,540
Members
449,038
Latest member
Guest1337

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