Compare Two workbooks and copy values

DanielS

Board Regular
Joined
Sep 4, 2011
Messages
53
I am working in Excel 2000. I have a main workbook named Pramon.xls which has 200 rows and columns A to P with data. I have other files which may have from 150 to 250 rows and columns from A to H. I wish to compare values in Column D of Pramon.xls with D column values of the second workbook and if the values of two files match, then place the corresponding M cell values of Pramon.xls in I column of the second workbook at appropriate cells. Could someone help me with this. I could not find similar solution elsewhere.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
col Dcol Mcol Dcol I
1234561213141516
2345671314155175
3456781415161718
4567891516171819
56789101617181920
678910111718199219
7891011121819202122
89101112131920212223
910111213142021222324
1011121314152122232425
111213141516222324142614
1213141516172324252627
1314151617182425262728
1415161718192526272829
1516171819202627282930
formula giving 5 in col I of second table
=IF(D9=L9,D9,"")
put the full address for D9, something like
=if(pramon.xls:sheet1!D9
use help to check syntax

<colgroup><col><col span="13"></colgroup><tbody>
</tbody>
 
Upvote 0
Thanks for your answer. Unfortunately, I was not in a position to incorporate your formula into a macro as I am not quite an expert in Excel. Could someone suggest a macro to carry out the above operation?
 
Upvote 0
Hi Oldbrewer:

Unfortunately I could not make out much from your answer, the chart and the formula. That's why I requested if anyone from our forum could come up with some sort of a macro to do that task. Could you explain your solution in little more detail so that a layman like me can understand it? What would be the exact formula, each component of the formula, and where to place it etc, etc.
 
Upvote 0
Hi Oldbrewer:

I would like to draw your attention to my earlier post. I hope you have gone through the same. I am eagerly awaiting your detailed response.
 
Upvote 0
pramon_column_Dpramon_column_Msecond_workbook_column_Dsecond_workbook_column_I
151022@@@@@
252033
35303530
454099
555088
656077
757066
85808580
9590101
106001092
formula incellmarked @@@@@
=IF(E5=A5,B5,"")
you will have to tweak this formula to something like
=if(e5=pramon.xls:sheet1!a5,pramon.xls:sheet1!b5,"")
check the exact syntax in help

<colgroup><col><col><col span="2"><col><col><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,857
Members
449,051
Latest member
excelquestion515

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