This macro takes whatever values are in a selected range of cells and multiplies them by -1. This is especially useful for accountants who might get a list of client data as absolute values. In accounting world, however, the debits and credits might need to have a sign reversed. With this macro, just select the cells you want reversed, and run the macro. Copy all of the code … [Read more...]
Move Selection
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...]