Compare rows between two sources and output yes/no for matching

tuong_ng89

New Member
Joined
Feb 18, 2025
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello all,


I have about close to 3000 rows of data I need to compare and find mismatch and I'm in need of a macro or anything that can help me get the result in a timely manner.

Quick summary. I have users from source A and source B. Each users are assigned a repo and a role in each source. The goal is to find the mismatch between the user's assigned repo and their role. Below is a sample table I did manually. There will be some duplicates but that's fine. I can filter that out later. There are supposed to be empty cell for B Source if A source has text and vice versa. What I'm aiming for is to output the red and blue fills where there's a mismatch in either role, repo A or repo B.
Source A and B Discrepencies.xlsx
ABCDEFGH
1SourceUsernameRepoRole in Manual SourceRole in Automatic SourceRole MatchRepo in Manual SourceRepo in Automatic Source
2ManualAlphaAngelEnd UserYesYesYes
3ManualAlphaBeltanePlanning UserYesYesYes
4ManualAlphaAngelEnd UserYesYesYes
5ManualAlphaAngelEnd UserYesYesYes
6AutomatedAlphaAngelEnd UserYesYesYes
7AutomatedAlphaBeltanePlanning UserYesYesYes
8ManualBravoAngelEnd UserYesYesYes
9ManualBravoAngelEnd UserYesYesYes
10ManualBravoAngelEnd UserYesYesYes
11AutomatedBravoAngelEnd UserYesYesYes
12ManualCharlieChakraEnd UserYesYesYes
13AutomatedCharlieDivinationEnd UserNoNoYes
14AutomatedCharlieEnlightenmentEnd UserNoNoYes
15AutomatedCharlieFilioquePlanning UserNoNoYes
16ManualDeltaChakraEnd UserNoYesNo
17AutomatedDeltaDivinationEnd UserNoNoYes
18AutomatedDeltaEnlightenmentEnd UserNoNoYes
19AutomatedDeltaFilioquePlanning UserNoNoYes
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F1:H19Cell Valuecontains "Yes"textNO
F1:H19Cell Valuecontains "No"textNO
A1:A19Cell Valuecontains "Manual"textNO
A1:A19Cell Valuecontains "Automated"textNO
 
Welcome to the MrExcel board!

This is my attempt but perhaps I am not understanding correctly?
My results mostly agree with yours but can you explain why the two orange cells should be "Yes" as shown in your results?

25 02 19.xlsm
ABCDEFGH
1SourceUsernameRepoRole in Manual SourceRole in Automatic SourceRole MatchRepo in Manual SourceRepo in Automatic Source
2ManualAlphaAngelEnd UserYesYesYes
3ManualAlphaBeltanePlanning UserYesYesYes
4ManualAlphaAngelEnd UserYesYesYes
5ManualAlphaAngelEnd UserYesYesYes
6AutomatedAlphaAngelEnd UserYesYesYes
7AutomatedAlphaBeltanePlanning UserYesYesYes
8ManualBravoAngelEnd UserYesYesYes
9ManualBravoAngelEnd UserYesYesYes
10ManualBravoAngelEnd UserYesYesYes
11AutomatedBravoAngelEnd UserYesYesYes
12ManualCharlieChakraEnd UserNoYesNo
13AutomatedCharlieDivinationEnd UserNoNoYes
14AutomatedCharlieEnlightenmentEnd UserNoNoYes
15AutomatedCharlieFilioquePlanning UserNoNoYes
16ManualDeltaChakraEnd UserNoYesNo
17AutomatedDeltaDivinationEnd UserNoNoYes
18AutomatedDeltaEnlightenmentEnd UserNoNoYes
19AutomatedDeltaFilioquePlanning UserNoNoYes
Compare
Cell Formulas
RangeFormula
F2:F19F2=IF(COUNTIFS(A$2:A$19,IF(A2="Manual","Automated","Manual"),B$2:B$19,B2,C$2:C$19,C2,IF(D2="",D$2:D$19,E$2:E$19),D2&E2),"Yes","No")
G2:G19G2=IF(COUNTIFS(A$2:A$19,"Manual",B$2:B$19,B2,C$2:C$19,C2),"Yes","No")
H2:H19H2=IF(COUNTIFS(A$2:A$19,"Automated",B$2:B$19,B2,C$2:C$19,C2),"Yes","No")
 
Upvote 1
Solution
Welcome to the MrExcel board!

This is my attempt but perhaps I am not understanding correctly?
My results mostly agree with yours but can you explain why the two orange cells should be "Yes" as shown in your results?

25 02 19.xlsm
ABCDEFGH
1SourceUsernameRepoRole in Manual SourceRole in Automatic SourceRole MatchRepo in Manual SourceRepo in Automatic Source
2ManualAlphaAngelEnd UserYesYesYes
3ManualAlphaBeltanePlanning UserYesYesYes
4ManualAlphaAngelEnd UserYesYesYes
5ManualAlphaAngelEnd UserYesYesYes
6AutomatedAlphaAngelEnd UserYesYesYes
7AutomatedAlphaBeltanePlanning UserYesYesYes
8ManualBravoAngelEnd UserYesYesYes
9ManualBravoAngelEnd UserYesYesYes
10ManualBravoAngelEnd UserYesYesYes
11AutomatedBravoAngelEnd UserYesYesYes
12ManualCharlieChakraEnd UserNoYesNo
13AutomatedCharlieDivinationEnd UserNoNoYes
14AutomatedCharlieEnlightenmentEnd UserNoNoYes
15AutomatedCharlieFilioquePlanning UserNoNoYes
16ManualDeltaChakraEnd UserNoYesNo
17AutomatedDeltaDivinationEnd UserNoNoYes
18AutomatedDeltaEnlightenmentEnd UserNoNoYes
19AutomatedDeltaFilioquePlanning UserNoNoYes
Compare
Cell Formulas
RangeFormula
F2:F19F2=IF(COUNTIFS(A$2:A$19,IF(A2="Manual","Automated","Manual"),B$2:B$19,B2,C$2:C$19,C2,IF(D2="",D$2:D$19,E$2:E$19),D2&E2),"Yes","No")
G2:G19G2=IF(COUNTIFS(A$2:A$19,"Manual",B$2:B$19,B2,C$2:C$19,C2),"Yes","No")
H2:H19H2=IF(COUNTIFS(A$2:A$19,"Automated",B$2:B$19,B2,C$2:C$19,C2),"Yes","No")
This is exactly why I needed a script/macro to help haha. That was a misread on my part and I made an error. Imagine having to do this manually for 3000 rows. Your attempt was correct!
 
Upvote 0

Forum statistics

Threads
1,226,795
Messages
6,193,047
Members
453,772
Latest member
aastupin

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