+ Reply to Thread
Results 1 to 3 of 3

Please help!!!

Hybrid View

Baza171 Please help!!! 01-30-2007, 04:38 AM
Bryan Hessey how are you deleting sheet1... 01-30-2007, 08:33 PM
Bryan Hessey one possibility, In... 01-30-2007, 09:19 PM
  1. #1
    Registered User
    Join Date
    01-30-2007
    Posts
    10

    Question Please help!!!

    Ive got a spreadsheet which im trying to enter information on sheet 1 but want it to record every entry on sheet 2 in a list type form. The trouble im having is that i have to delete sheet 1 with every new entry and it just deletes my info on sheet 2.

    Please help any ideas!!!!!

    Thanks for reading!!

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Baza171
    Ive got a spreadsheet which im trying to enter information on sheet 1 but want it to record every entry on sheet 2 in a list type form. The trouble im having is that i have to delete sheet 1 with every new entry and it just deletes my info on sheet 2.

    Please help any ideas!!!!!

    Thanks for reading!!
    how are you deleting sheet1 data, and what cells does the data occupy?
    which column signifies that the dataline is finished (fully entered)

    ---
    Si fractum non sit, noli id reficere.

  3. #3
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Baza171
    Ive got a spreadsheet which im trying to enter information on sheet 1 but want it to record every entry on sheet 2 in a list type form. The trouble im having is that i have to delete sheet 1 with every new entry and it just deletes my info on sheet 2.

    Please help any ideas!!!!!

    Thanks for reading!!
    one possibility,

    In sheet1, rightmouse the tab, and View Code

    paste this code there.
    Private Sub worksheet_change(ByVal Target As Range)
    If Target.Column = 1 And Cells(Target.Row, 1).Value = "" Then
        Application.EnableEvents = False
        Dim iLastRow As Long, sAddress As String, iRowTo As Long
        sAddress = Target.Address
        Application.Undo
        iLastRow = Sheets("Sheet2").Range("A65536").End(xlUp).Row
        iRowTo = 0
        On Error Resume Next
        iRowTo = Application.WorksheetFunction.Find(":", sAddress, 1)
        If iRowTo > 0 Then
            iRowTo = Application.WorksheetFunction.Find("$", sAddress, iRowTo + 2)
            iRowTo = Mid(sAddress, iRowTo, 5)
            End If
        If iRowTo < Target.Row Or iRowTo > 100 Then
            iRowTo = Target.Row
            End If
        Range("A" & Target.Row & ":A" & iRowTo).EntireRow.Cut Sheets("Sheet2").Range("A" & iLastRow + 1)
        Application.CutCopyMode = False
        Application.EnableEvents = True
    End If
    End Sub
    when you delete a cell (or row) that row should appear on Sheet2

    hth
    ---amended for multiple rows.
    Last edited by Bryan Hessey; 01-30-2007 at 09:25 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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