+ Reply to Thread
Results 1 to 2 of 2

Thread: New Worksheet - Down 1 Line

  1. #1
    Registered User
    Join Date
    09-04-2010
    Location
    Northampton, England
    MS-Off Ver
    Excel 2003
    Posts
    1

    New Worksheet - Down 1 Line

    Hi

    I have created a workbook with multiple sheets.

    Sheet 1 is a data entry sheet (Data Entry)

    The Data I am intersted in is linked to cells J2:AE2

    I then copy this row of Data (j2:AE2) to another worksheet called Database.

    on database Row 1 is titles
    Database Row 2 (cells A2- v2) accepts the copy / Paste special (values) of the data upon the execution of a command button (macro)

    The problem is the pertinent data overwrites on row 2 of the database sheet upon every execution, where as what I really want is to build up the data base whereby every entry drops down a row upon execution of the command button (e.g most recent data drops to bottom of list on database) so for example when I accept data 1st lot ends up on row 2 of database, next ot on row 3 of database, next on row 4 etc....

    I am quite new to VBA (but keen to learn) but reasonably skilled in excel, I know I have to write a macro to enable this please can anyone help with advice

    Thank You

  2. #2
    Forum Guru mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2007/2010
    Posts
    3,004

    Re: New Worksheet - Down 1 Line

    Can be done like this.

    Sub Test()
    Sheets("Data Entry").Range("J2:AE2").Copy
    Sheets("Database").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial (xlValues)
    End Sub
    Martin

    Eighty Twenty Spreadsheet Automation http://homepage.ntlworld.com/martin.rice1/ for all your Excel customisation and consulting needs.

    If my solution has saved you time and/or money, please consider donating to Cancer Research UK.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0