+ Reply to Thread
Results 1 to 3 of 3

Archive records once a certain number has been reached

Hybrid View

gelandl Archive records once a... 10-01-2008, 06:52 AM
ravishankar macro 10-01-2008, 08:34 AM
gelandl Hi Ravi This does not... 01-22-2009, 10:40 AM
  1. #1
    Registered User
    Join Date
    08-21-2008
    Location
    South Africa
    Posts
    37

    Archive records once a certain number has been reached

    Is it possible to write a command that will send all data captured on sheet 1 to another sheet as an archive? In other words, users will enter data on sheet 1, once they have reached row 100, all the data on row 1 - 100 will move to the archive spreadhseet and clear the rows on sheet 1.

    If this is still confusing let me know.

    Thanks

  2. #2
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    macro

    Hi
    try the following codes
    Sub auto_open()
    Dim x As Long, y As Long
    x = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
    y = Sheets("Sheet2").Cells(Rows.Count, 1).End(xlUp).Row
    If x > 100 Then
    Sheets("Sheet1").Range("A2:Z" & x).Copy
    Sheets("Sheet2").Range("A" & y + 1).PasteSpecial
    End If
    Sheets("Sheet1").cells.clearcontents
    ActiveWorkbook.Save True
    End Sub
    When you open the workbook, if it has over 100 rows of data in sheet1, it will copy it to sheet2.
    Ravi

  3. #3
    Registered User
    Join Date
    08-21-2008
    Location
    South Africa
    Posts
    37
    Hi Ravi

    This does not seem to be working. I have entered the code on my sheet 1 and then saved it. I then closed and opened the workbook and all 300+ records are still there.

    RGDS

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 07-29-2008, 03:23 PM
  2. count the number of members in cells seperated by ;
    By wali in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-23-2008, 01:46 PM
  3. multyplication by finding number from rows
    By vinumv in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-14-2008, 02:22 PM
  4. Replies: 4
    Last Post: 06-13-2007, 12:24 AM
  5. number puzzle
    By mkron in forum Excel General
    Replies: 14
    Last Post: 01-28-2007, 12:13 AM

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.6.0 RC 1