From the course: Excel: Macros and VBA for Beginners

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Record the macro and review the code

Record the macro and review the code - Microsoft Excel Tutorial

From the course: Excel: Macros and VBA for Beginners

Start my 1-month free trial

Record the macro and review the code

- Why are we here? To learn about VBA and recorded macros. Now, let's record a macro. The situation is, we get this data pasted into this workbook every month. And then we have to reformat it a very specific way or the boss gets angry. Recording a macro is going to make this quicker, more accurate and eliminate grief. So I am already in the 'Developer' tab. Go to 'Record Macro'. I'm going to call this, 'reformat'. Okay. The first step, right-click the tab. Move our copy. Create a copy. Move to end. Okay. We want to get rid of the first two rows. Highlight them. Right-click, delete. And then the boss wants a split between June and July. Highlight that. Drag it down. We want year-to-date totals, YTD totals, all caps. And then equals sum, to get a sum of each product line. Enter, and then drag that across. Now we want that formatted as money. Go home and then format as money. Now…

Contents