Results 1 to 15 of 15

Removing a line of data in a spreadsheet

Threaded View

  1. #1
    Registered User
    Join Date
    01-23-2013
    Location
    Cornwall
    MS-Off Ver
    Excel 2003
    Posts
    30

    Removing a line of data in a spreadsheet

    I have this macro that finds a line of data that is annoted 'complete' and records the row of data in another worksheet called complete.
    It works fine.
    What I would like to do is once the line of data is transferred to the new sheet I would like the original line of data to be removed.
    Can anyone help please
    I tried to add a line to the macro but it didn't work
    Thanks
    Range("C" & Target.Row).Copy Sheets("COMPLETE").Range("B" & foundCase.Row)
                Range("G" & Target.Row).Copy Sheets("COMPLETE").Range("C" & foundCase.Row)
                Range("Z" & Target.Row).Copy Sheets("COMPLETE").Range("D" & foundCase.Row)
                Range("H" & Target.Row & ":U" & Target.Row).Copy Sheets("COMPLETE").Range("E" & foundCase.Row)
                Range("W" & Target.Row).Copy Sheets("COMPLETE").Range("S" & foundCase.Row)
                Range("AA" & Target.Row).Copy Sheets("COMPLETE").Range("T" & foundCase.Row)
                
            Else
                 bottomA = Sheets("COMPLETE").Range("A" & Rows.Count).End(xlUp).Row
                 Range("A" & Target.Row).Copy Sheets("COMPLETE").Range("A" & bottomA + 1)
                  Range("C" & Target.Row).Copy Sheets("COMPLETE").Range("B" & bottomA + 1)
                Range("G" & Target.Row).Copy Sheets("COMPLETE").Range("C" & bottomA + 1)
                Range("Z" & Target.Row).Copy Sheets("COMPLETE").Range("D" & bottomA + 1)
                Range("H" & Target.Row & ":U" & Target.Row).Copy Sheets("COMPLETE").Range("E" & bottomA + 1)
                Range("W" & Target.Row).Copy Sheets("COMPLETE").Range("S" & bottomA + 1)
                Range("AA" & Target.Row).Copy Sheets("COMPLETE").Range("T" & bottomA + 1)
                Range(Target.Row).EntireRow.Delete
            End If
             ElseIf Target = "complete" Then
            bottomC = Sheets("SSAFADivFunds").Range("C" & Rows.Count).End(xlUp).Row
            Set foundCase = Sheets("SSAFADivFunds").Range("C2:C" & bottomC).Find(Target.Offset(0, -17), LookIn:=xlValues, LookAt:=xlWhole)
            If Not foundCase Is Nothing Then
            Range("A" & Target.Row).Copy Sheets("SSAFADivFunds").Range("A" & foundCase.Row)
    Last edited by scrumpyjack; 12-10-2017 at 10:50 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] UserForm to Spreadsheet - Cannot get data to go to the next empty line.
    By ChristaToTheMax in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-16-2017, 12:39 PM
  2. Removing one spreadsheet of data from another
    By AndyH1 in forum Excel General
    Replies: 5
    Last Post: 11-18-2015, 05:17 AM
  3. [SOLVED] Removing HTML tags from a spreadsheet from data obtained through a database query
    By Excelfail in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-17-2014, 12:35 AM
  4. Replies: 0
    Last Post: 07-29-2014, 11:43 PM
  5. Browse window: Importing data onto a new line in another spreadsheet
    By jennymc in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 06-18-2013, 05:34 AM
  6. [SOLVED] How do I get to the last line of a large spreadsheet to add data
    By LyndaGTT in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-07-2006, 01:25 PM
  7. Replies: 6
    Last Post: 02-21-2006, 01:20 PM

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