I need code for a macro that would populate one excel workbook (t) with the information contained in another excel workbook (M) (M is the master file from which about 45 t's - templates for different departments, will be populated)

To make things simple, (M) has two columns: 1)fund number (which is a 4 digit number), and 2)the dollar amount in that fund. For simplicity purposes (t) also has two columns: 1) fund number, and 2) a cell on the same row as the fund number where the dollar amount should be entered.

(M) and (t) are two separate workbooks. I need the macro to compare the fund numbers in workbooks (M) and (t), if they equal then the dollar amount next to fund number in the second column should be transferred from (M) and entered into (t) in column 2). If the fund numbers are not equal then a zero should be entered into (t), column 2).

A little problem is that not all fund numbers in (t) are in the Master workbook (M). If the fund number in (t) does not appear in (M) then zero should be entered in comumn 2).

Another little problem is that the fund number in the first column of (M) and (t) are not in any particular order.

If someone can help me out with this I would appreciate it immensely. If something's not clear feel free to ask I will do my best to clearify what I'm trying to do here.

best,
Mike