Microsoft KB Archive/31634

-

{| 2.x 3.00 4.00 4.00a 5.00 | 2.20 2.21 3.00 WINDOWS                 | OS/2
 * width="100%"|

The information in this article applies to:
 * Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a, 5.0
 * Microsoft Excel for OS/2 versions 2.2, 2.21, and 3.0

SUMMARY
You can use a macro to copy information and add it to the end of an Excel database.

MORE INFORMATION
If there is data in every cell of the first column of the database, use the following procedure:

 Select the upper-left cell of the database.  Use the following command to change the selection to the last occupied cell in that column: =SELECT.END(4)   Use the following command to move the selection one more row downward: =SELECT(&quot;R[1]C&quot;) 

The current selection will now be in the proper position to paste the new data into the database. If you add to the database, you must redefine the database by selecting the entire database and using the SET.DATABASE command. However, if the database has been defined to include one blank row beneath the initial set of data, it automatically adjusts itself to include the new data. If there are some blank cells in the first column of the database, use the following function (where SHEET1 is the name of the worksheet and A1 is the upper-left cell of the database):

=SELECT(OFFSET(SHEET1!A1,ROWS(SHEET1!DATABASE),0)) Please note that the database must be defined for this method to work correctly. For alternative methods to add information to a database through a macro, query on:

offset and database and macro and excel
 * }

-

Last reviewed: December 1, 1994

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.