Create macro for fade In / fade out

Hi, fairly new to audacity. I create excerpts for my musical pieces, need lots of fade in / fade out. I’d like to set up a macro so that I select a region, then use a quick keystroke which carries out the macro for a fade during that selected section. I’ve tried repeatedly but can’t seem to get it to work. Very confusing. I would really appreciate if someone could give me a quick step-by-step. To be clear: I don’t want to set a fixed time for the fade out; I will select a section and when I hit the keyboard shortcut, it carries out the macro. Thanks very much!