November 8, 2018
Everyday I run a report in excel. I spend some time formatting it and would like to run a macro. I’m new to macros and don’t understand how to write them or the language but understand how to record them. In my spreadsheet I can get it to do every step but steps 4, 5, and 8. I know there must be a way to do this but not sure how. Hoping someone can walk me through the steps and explain it in English so I can record the macro and save time at work.
- Delete row 1
- Sort by location, then last name
- Delete column C, H, and I
- Delete rows that aren’t location x
- Add Boss 1 and Boss 2 to next available row
- Add 2 rows at top
- Type location name and date
- Sum columns E, F, and G
- Set printer settings
July 16, 2010
All of this can be done with Power Query except step 9: Printer settings, but you should be able to record a macro for that.
Note: Step 5 isn't in the attached file because I didn't understand whether you mean add two rows at the end of the table before the sums mentioned in step 8, or to add two rows after every row, or whether I was even adding two rows, maybe you meant 1 row with Boss 1 and Boss 2 in a single cell.... so many questions about this step that an example would be clearer.
Step 7 wasn't done either because I didn't know where you wanted to type the location name and date. Is this on every row?
Perhaps you could share the 'after' view of what you'd like to see so we can fill in the missing steps. Please use the file attached which already has the query part completed.
November 8, 2018
The spreadsheet is exported each day from another source so we really just want a macro to run the whole thing and print the sheet and then we don't use the sheet again. Just trying to hit one key to run the macro and type in 2 numbers each day then print it and be done rather than spending 5 minutes formatting it before we can enter the information we need and then discard it.
I can figure out the macro for everything except steps 4, 5, and 8.
In step 4 I need to delete all rows not in location x
In step 5 I need to then enter Boss 1 in the first available row (I type in manually his rt and ot after as that changes everyday), then in the row under that type in Boss 2 (I type in manually his rt and ot as well)
In step 8 I need to sum the rt, ot, and th columns (this is different everyday depending on the number of rows
Was hoping you could explain the steps i could take to do this so I can record the macro.
I've attached a before and after copy. Hoping this helps!