Hi, HH,
you choose the wrong forum to post your question (should have been General or VBA, maybe thread can be moved there by staff? TIA).
Automatic, for one cell only, for a range, which cell to copy from where? A lot of additional questions.
A macro which needs to be started by hand checking the contents of the presently active cell and adding the value form the cell above may look like this which doesnīt take care of Formulas in the cell returning "":
How to install your new code
- Copy the Excel VBA code
- Select the workbook in which you want to store the Excel VBA code
- Press Alt+F11 to open the Visual Basic Editor
- Choose Insert > Module
- Edit > Paste the macro into the module that appeared
- Close the VBEditor
- Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)
To run the Excel VBA code:- Press Alt-F8 to open the macro list
- Select a macro in the list
- Click the Run button
Regarding VBScript or "simple" macro: this depends on whether you wan the code to run from within the Application Excel (this is what you may think of to be a macro) or from outside of Office/Excel. But that may only be answered from you as I canīt see what you really want to achieve and thus provide more detailed information.
Ciao,
Holger
Bookmarks