In MS Excel, macro code is a programming code which is written in VBA (Visual Basic for Applications) language.
The idea is to use macro code for automating various activities which you perform manually in Excel, otherwise.
For example, you can use a code to print only a particular range of cells just with a single click instead of selecting the range -> File Tab -> Print -> Print Select -> OK Button.