How to increase the number of undo levels in Excel

By default, Excel keeps track (allocates RAM) of 16 "undo" levels. Undo levels provide an undo history for most actions that you perform in Excel. You can change the number of undo levels by adding an entry in the Microsoft Windows registry.

How to increase the number of undo levels in Excel by changing the registry

If the undo history is set to zero, no memory is allocated for undoing actions. The higher the undo history value, the more memory Excel allocates for the history. This directly affects the performance of your computer when you run Excel.

Microsoft has written an article about this on their website (Article ID 211922):
http://support.microsoft.com/default.aspx?scid=kb;en-us;211922

Note
When you run a Visual Basic for Applications macro, Excel allocates no memory for undoing actions. This feature is disabled for optimization of performance when you run a macro. (See also 'Not all tools in ASAP Utilities have an undo'