Compare on a condition and Highlight the Difference

Closed
HolyAngel Posts 2 Registration date Thursday March 5, 2015 Status Member Last seen March 6, 2015 - Mar 5, 2015 at 01:58 PM
RayH Posts 122 Registration date Tuesday August 31, 2010 Status Contributor Last seen June 20, 2016 - Mar 6, 2015 at 02:47 PM
Hello,
I have a requirement to compare two different tabs on same sheet and display the difference either by highlighting the rows or add a comment.
here it goes:
Sheet1: ID, Name1, Name2, Street, City and Zip (No Duplicates)
Sheet2: Name2,Street, City and Zip (More Records and possibly duplicate entries)
I have to pick a Name2 from sheet1 and compare it against with Sheet2 for the fields Street, City and Zip.
When I click a button then the macro should run and Differences should be highlighted with conditional formatting or adding a note.
Would it be possible? anyone can help me to write a macro for this?
Thank you in advance
Related:

2 responses

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Mar 6, 2015 at 06:32 AM
post very small extract of 2 sheets and explain AGAIN
0
HolyAngel Posts 2 Registration date Thursday March 5, 2015 Status Member Last seen March 6, 2015
Mar 6, 2015 at 11:49 AM
Hi Venkat,
Sure.

Sheet1:

ID Name Data internal DType
1 Name1 XXX 2-May VARCHAR2(60)
2 Name2 YYY 30-Apr DATE
3 Name3 AAA 21-Oct DATE
4 Name4 CCC 30-Apr NUMBER


Sheet2:

ID Add T_Name
1 Y T_Name1
2 N T_Name2
3 Y T_Name3
4 Y T_Name4

Sheet3:

Table C_Name Type Length
Table1 T_Name1 VARCHAR2 60
Table2 T_Name2 VARCHAR2 60
Table3 T_Name3 DATE 7
Table4 T_Name4 DATE 7


Now I need the result in this format:

ID Name DType T_Name C_Name concatenate(Type&Length)

whether DType and Concatenated(Type&/Length) is matching for Name and T_Name

and highlight the difference.

Thanks.
0
RayH Posts 122 Registration date Tuesday August 31, 2010 Status Contributor Last seen June 20, 2016 26
Mar 6, 2015 at 02:47 PM
Comparing records like you need is reliant on the data in the fields being EXACT matches.
For example, street addresses like "123 Smith Street" is NOT the same as "123 Smith St." so this would not be recorded as a match.

If this situation does not occur in your data then please disregard this comment.
0