These macros change the default direction after pressing enter, of down, to whichever direction you specify. Particularly useful if entering data across several columns rather than down a single row. It keeps you from having to click through all the Excel menus to find where this option is located in Excel. Direction variables are as follows: Up: xlUp; Down: xlDown; Left: … [Read more...]
Multiply by X
This macro will take the values in a given range and multiply them by whatever value you specify in the code. The code currently multiplies by 1,000,000, however replacing the 1000000 in "cell.Value = cell.Value * 1000000" with whatever value you need. Use caution with this macro, as it will convert any formulas to a number multiplied by whatever value you specify (i.e. if cell … [Read more...]
Multiply by X (Keep Formula)
This macro has the same functionality of the "Multiply by X" macro, however it allows you to keep your formulas in tact, by simply adding *1000000 (or whatever value you specify) to the end of the formula (i.e. =A1 will become =A1*1000000, not 1,000,000 as per the example here). Copy all of the code below. Paste it into your workbook's Visual Basic editor, either under a … [Read more...]
Counter
Sometimes it is useful to know how many times a macro has been run. For example, if you run a macro once a week to perform a particular task, but don't want it run more than once a week, having a counter might be helpful. Copy all of the code below. Paste it into your workbook's Visual Basic editor, either under a Microsoft Excel Object or Module. You can also add other … [Read more...]
Gridlines On/Off
Have you ever set the fill color of an entire sheet (or workbook) to white just because you didn't want to see the gridlines? Well if you have a large file, you could literally reduce the file size in half by not coloring the cells. Simply remove the gridlines (after all that's what you wanted to do in the first place isn't it?). Copy all of the code below. Paste it into … [Read more...]