Sure. This is an example of how you can do it.
1. Click on the record macro button on the bottom left (Excel 2007 and above)
2. Give a suitable name to your macro
3. Assign some shortcut key (I've used CTRL+SHIFT+r)
4. Select Personal Macro Workbook
5. Hit OK
6. Now type something in the active cell
7. Hit ALT+F11 (this will open the VBE)
8. You will find the personal workbook.xlsb in the project explorer to the left
9. Open the module (you'll find the macro with the name you provided)
10. Replace the code (it should look something like this: ActiveCell.FormulaR1C1 = "fdafs") with what I gave
11. Now ensure the formula and the ranges I used are corrected according to your requirement.
12. Close Excel application and ensure you save the personal macro workbook. You should now be done.
13. When you wish to run the macro by hitting the shortcut key, ensure your active workbook is the one where you want the formula to be inserted
Code:
ActiveSheet.Range("B1:B100").Formula = "=MATCH(A2,'[The File That You Want To Lookup From.xlsx]Sheet1'!$A$1:$A$50,0)"
Post back if you aren't able to make it work