Article ID: 141692 - View products that this article applies to.
This article was previously published under Q141692
Using Microsoft Visual Basic for Applications code, you can return the value of the last cell on any given sheet.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. The following example retrieves data from the last cell on the worksheet, assigns it to a variable, and displays the variable in a message box. To use this macro, follow these steps:
(http://support.microsoft.com/kb/244435/ )How to reset the last cell in Excel
For more information about the last cell, click Answer Wizard on the Help menu and type:
Tell Me About The Last CellIn Microsoft Excel version 5.0, click Contents on the Help menu. Select Programming With Visual Basic, click the Search button, and type:
Article ID: 141692 - Last Review: January 19, 2007 - Revision: 3.4
Contact us for more help
Connect with Answer Desk for expert help.