Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Macro | 28 comments | Create New Account
Click here to return to the 'Macro' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Macro
Authored by: sinjin on Sep 02, '04 12:27:22PM
Here is a macro so you can instantly do this to any sheet. Just paste it into a new macro module (alt-F11; Insert->Module), preferably in your "Personal Macro Workbook" for all the time access.

Sub Ledger()
    Cells.Select
    Selection.FormatConditions.Delete
    Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
        "=MOD(ROW(),3)=0"
    Selection.FormatConditions(1).Interior.ColorIndex = 19
'    ActiveWindow.DisplayGridlines = False
End Sub
Note the single quote is a comment tag. Remove it if you prefer to suppress gridlines. You could also record your own macro (that is what I did for the code above) with your own customizations.

[ Reply to This | # ]
Macro
Authored by: deggy on Sep 03, '04 04:53:56AM

I have been able to run the macro on the sheet I have open, but how do I get the macro to live in all new documents I create?



[ Reply to This | # ]
Macro
Authored by: sinjin on Sep 03, '04 02:12:54PM

From Excel Help:
If you want a macro to be available whenever you use Excel, store the macro in the Personal Macro Workbook in the Microsoft Office X->Office->Startup->Excel folder.

Note that this file is usually open, but hidden, every time you start Excel. It should be listed in the drop down menu for places to save a macro, and you should be able to "unhide" it from the Window menu.



[ Reply to This | # ]