Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two Excel spreadsheets. In the first spreadsheet I have nearly 20 columns and first column is unique ID. Once again Spreadsheet 2 has its own data of about 20 columns but only 4columns matches between this two speardsheets including similar unique ID column.

What I want to achieve:

Compare the column's that are similar in both the spreadsheet of Spreadsheet 2 against Spreadsheet 1.

say there is an update in spreadsheet1 in one of the common columns which is present in spreadsheet2 then it should update the difference and then highlight it after comparison.
To explain myself more, Say Spreadsheet 2, has 4 entries like 111,222,333,444 and suppose I want to validate the value for entry 111. Then my formula should search for 111 in Spreadsheet 1 Column A, then it should pick the data or value for it, then compare it with the value or data of the Spreadsheet 2 entry for 111, and then let me know if there is any update or changes made in any of the common columns after comparing.

can a vlookup function do this or can someone suggest some alternative for this..???
and can i perform this action through command line button on Spreadsheet1 (just by clicking the button it should perform the above task of comparison).

What I have tried:

I tried various VBA codes but in the end they either compare the cells range or add/delete new rows and columns. so I thought of starting it afresh and asking if someone can help me. I think there must me a solution for this problem somewhere as it's a basic problem with everyone who updates there records manually from different reports monthly/quarterly. Hope you understand.
Posted
Updated 15-Aug-18 9:52am
v2
Comments
CHill60 15-Aug-18 8:21am    
We can help you but you have to do some work first. It's not entirely clear what you are trying to achieve but if all you want to say is something like "is the value in column B of Spreadsheet 1 the same as the value in Column C of Spreadsheet 2" then it's trivial. You can do this with VLOOKUP OR with VBA - it's your choice.
You might have problems identifying spreadsheet 2 if it changes every month or just make sure that it is always the same name and in the same place for the purposes of the comparison.
Remember to handle the scenario where values don't exist in the lookup, using the IFNA() function (or IFERROR())
If you do this via formulae then you won't need a button push (or F9 will recalc for you)
RedDk 15-Aug-18 10:42am    
.Shower us with some code
Patrice T 15-Aug-18 16:54pm    
Looks like you are unable to show code.
Have you already thought about hiring a professional programmer to do the job.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900