Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 2 of 2

Thread: Copy Rows & Insert At Bottom

  1. #1
    Join Date
    7th August 2008
    Posts
    1

    Copy Rows & Insert At Bottom

    i currently have a recorded marco that inserts four rows, highlights and copies a different four rows and pastes it (while deleting their values) in the rows that were inserted.

    the problem is that when i want to run the macro again, the four new rows that are inserted are in between the original four rows and the four rows that was pasted the first time the macro was ran.

    i'd like to have a macro that will paste the rows at the bottom of the list.

    the code currently look like:

    VB:
    Sub InsertRow() 
         
        InsertRow Macro 
         
        Rows("18:21").Select 
        Selection.Insert Shift:=xlDown 
        Rows("14:17").Select 
        Range("C14").Activate 
        Selection.Copy 
        Rows("18:21").Select 
        ActiveSheet.Paste 
        Range("J18").Select 
        Application.CutCopyMode = False 
        ActiveCell.FormulaR1C1 = "" 
        Range("J21").Select 
    End Sub 
    
    
    Any help would be greatly appreciated.
    Reply With Quote

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    24th January 2003
    Location
    Australia
    Posts
    31,714

    Re: Insert Four Copied Rows At The Bottom

    VB:
    Sub InsertRow() 
         
         
         
        Rows("18:21").Copy 
        Cells(Rows.Count, "A").End(xlUp)(2, 1).Insert 
        Application.CutCopyMode = False 
    End Sub 
    
    

Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Copy Ranges & Insert Rows In Table
    By Vicki Callan in forum EXCEL HELP
    Replies: 5
    Last Post: March 27th, 2008, 09:04
  2. Insert Rows Macro & Copy Formats
    By Mechnelly in forum EXCEL HELP
    Replies: 18
    Last Post: September 27th, 2006, 23:13
  3. copy insert rows
    By eddie57 in forum EXCEL HELP
    Replies: 1
    Last Post: January 19th, 2005, 17:28
  4. Insert rows and copy formulas
    By rws1158 in forum EXCEL HELP
    Replies: 3
    Last Post: November 3rd, 2004, 21:38
  5. [Solved] VBA: Insert rows and copy formula
    By vbanew in forum EXCEL HELP
    Replies: 2
    Last Post: October 22nd, 2003, 06:04

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
  •  
porno