Macro to find/loop matchings names in 2 workbooks, update/add values

ANTON_NORTJE

New Member
Joined
Aug 28, 2014
Messages
3
Greetings everybody,

I will really appreciate if some-one could assist me with the following challenge as I have been searching for a solutions endless.



SCENARIO (accounting concept):


[1] I have 2 workbooks with columns as example.

[2] Macro to find matching "client" in the 2 WB'S, if the values/remarks are changed in WB1, it must

updated in WB2. (i.e. If in WB1 "client-AA", 100 moves from CURR to 60 or any of the next

columns, it must be updated in WB2)

[3] In the same instance, if new clients are added in WB1, the whole row must be updated in WB2.

(i.e. If in WB1 a new "client" is added, then the whole row is updated in WB2)



I trust this makes sense.


Regards



Anton


[TABLE="width: 432"]
<colgroup><col width="64" style="width: 48pt;" span="9"> <tbody>[TR]
[TD="width: 128, bgcolor: transparent, colspan: 2"]WORKBOOK 1:[/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]REF[/TD]
[TD="bgcolor: transparent"]CLIENT[/TD]
[TD="bgcolor: transparent"]CURR[/TD]
[TD="bgcolor: transparent"]30[/TD]
[TD="bgcolor: transparent"]60[/TD]
[TD="bgcolor: transparent"]90[/TD]
[TD="bgcolor: transparent"]120[/TD]
[TD="bgcolor: transparent"]120+[/TD]
[TD="bgcolor: transparent"]REMARKS[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]ref1[/TD]
[TD="bgcolor: transparent"]AA[/TD]
[TD="bgcolor: transparent"]100>>[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]abc[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]ref2[/TD]
[TD="bgcolor: transparent"]BB[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]200[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]rrr[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]ref3[/TD]
[TD="bgcolor: transparent"]CC[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]300[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]qqq[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]ref4[/TD]
[TD="bgcolor: transparent"]DD[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]600[/TD]
[TD="bgcolor: transparent"]ttt[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 535"]
<colgroup><col width="64" style="width: 48pt;" span="10"> <col width="73" style="width: 55pt; mso-width-source: userset; mso-width-alt: 2669;"> <tbody>[TR]
[TD="width: 128, bgcolor: transparent, colspan: 2"]WORKBOOK 2:[/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 73, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]REF[/TD]
[TD="bgcolor: transparent"]CLIENT[/TD]
[TD="bgcolor: transparent"]CURR[/TD]
[TD="bgcolor: transparent"]30[/TD]
[TD="bgcolor: transparent"]60[/TD]
[TD="bgcolor: transparent"]90[/TD]
[TD="bgcolor: transparent"]120[/TD]
[TD="bgcolor: transparent"]120+[/TD]
[TD="bgcolor: transparent"]REMARKS[/TD]
[TD="bgcolor: transparent"] TOTAL[/TD]
[TD="bgcolor: transparent"] PMT DATE[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]ref1[/TD]
[TD="bgcolor: transparent"]AA[/TD]
[TD="bgcolor: transparent"]100>>[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]abc[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]ref2[/TD]
[TD="bgcolor: transparent"]BB[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]200[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]rrr[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]>>>>[/TD]
[TD="bgcolor: transparent"]>>[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]>>>[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]>>>[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]>>>>[/TD]
[TD="bgcolor: transparent"]>>[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]>>>[/TD]
[TD="bgcolor: transparent"]>>>[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
</tbody>[/TABLE]



 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,222,900
Messages
6,168,926
Members
452,227
Latest member
sam1121

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