Comparing two Rows in Excel and highlight the Mismatch Cell

pratheesh1983

Board Regular
Joined
Aug 13, 2015
Messages
55
Office Version
  1. 365
Platform
  1. Windows
Hello,

Need help in formulating a formula:

In my team, we gets multiple file contains Client details from various other teams which we directly upload it to system. The files contains data in table form with proper preagreed headers. Unfortunately, we noticed off late, that few teams send data by changing the table format like by adding one extra column, or change a header. Because of which few data in system will get missed or may get corrupted.

To avoid the above issue, we came up with proposal to create a excel tool to compare the current file header Vs existing pre-agreed header. Basically what we planned is..In excel we will put the existing header in one Row and in row, below to it we will put the new file header. Excel will compare the both the Rows and provide a result as Pass (If all header is Matching) or Fail (if Header is not Matching).

The below is the example for the same. The List is of Arizona Top - The expected/agreed header is pasted next to agreed. New file header is pasted next to "Received"- The expectation for us is, the excel should Top Cell Vs Direct Below cell eg from below: Client Vs Client, C-ID Vs C-ID, Address Vs Contact No., Region Vs Address...and populate a result Pass/ Fail next to "Result-". In the below case, since in the new file a new column got added i.e Contact No. because of which the Result should. be fail.
I tried to get a new True False formula but some List have 30 to 40 headers, so practically it will make sense to get the result in one cell it self. Hence would request if some one can assist in putting formula here.

List Name
Arizona Top Agreed ClientC-IDAddressRegionTierRemarks
RecivedClientC-IDContact No.AddressRegionTierRemarks
Result - Fail






<colgroup><col><col><col span="7"></colgroup><tbody>
</tbody>
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi,

This is what I came up with, I used C1:Z1 in my sample, change the references to cover a larger than needed range as you wish.


Book1
ABCDEFGHI
1Arizona TopAgreedClientC-IDAddressRegionTierRemarks
2RecivedClientC-IDContact No.AddressRegionTierRemarks
3ResultFail
Sheet57
Cell Formulas
RangeFormula
B3=IF(SUMPRODUCT(--(C1:Z1=C2:Z2))<>COLUMNS(C1:Z1),"Fail","Pass")
 
Upvote 0
.. or reversing the comparison (still comparing columns C:Z), it shortens to

Excel Workbook
ABCDEFGHI
1Arizona TopAgreedClientC-IDAddressRegionTierRemarks
2RecivedClientC-IDContact No.AddressRegionTierRemarks
3ResultFail
Compare



However, the above formula also returns "Fail" for the data below. Should it be "Pass" since all the same fields appear, just in a different order?

Excel Workbook
ABCDEFGH
1Arizona TopAgreedClientC-IDAddressRegionTierRemarks
2RecivedClientC-IDRegionRemarksAddressTier
Compare (2)
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,639
Members
449,093
Latest member
Ahmad123098

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