Macros are built into Excel, depending on the version of excel - earlier one use vb script, later ones use full blown vb. You have a built in macro editor - try tools->macros->record do some stuff, save the macro and then look at the code. Lots of sources on the net to show how to do this. If you run VB/C# then you have access to the excel object via the excel object library and can treat excel like any other object from within your application. This is termed automation - and it can be done with all of the office products not just excel. Let me know if you need any more pointers