Results 1 to 5 of 5

Macro to copy rows from one sheet to the next available row in another sheet

Threaded View

  1. #1
    Registered User
    Join Date
    01-24-2012
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    39

    Macro to copy rows from one sheet to the next available row in another sheet

    Once upon a time, I utilized this site for help in writing a macro that would copy data from one sheet into the next available column of another sheet. Today, I want to do something similar, except I want it to be the next available row. I pulled up the code from my successful column copy exercise and modified it by just trying to change the column references to row references. But, clearly that didn't work. help!

    Thanks!

    Sub Inventory()
    '
    ' Inventory Macro
    '
    ' Keyboard Shortcut: Ctrl+i
    '
        Option Explicit
    
    Sub Trend()
        Dim LR As Long
        Dim NR As Long
        ' Keyboard Shortcut: Ctrl+i
    
        Application.ScreenUpdating = False    'turn off screen flicker
        With Sheets("DATA")
            .Range("B2").Copy
        End With
    
        With Sheets("Inventory")
            LR = .Range("B38").End(xlUp).Row
            If LR = 1 Then
                NR = LR + 1
            Else
                NR = LR + 1
            End If
            .Cells(NR, B).Paste
        End With
    
        With Sheets("Data")
            .Range("B6").Copy
        End With
    
        With Sheets("Inventory")
            .Cells(NR, C).Paste
        End With
    
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 04-16-2014, 07:19 PM
  2. Macro which will copy rows of data, in same order from one sheet, to another sheet!
    By WaylettChris in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-23-2013, 02:02 PM
  3. [SOLVED] Copy row from sheet 1 to next row in sheet 2. delete from sheet 1 and move rows up
    By papabob1954 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-16-2012, 09:38 PM
  4. Macro: Count rows in sheet A, copy count in sheet B, paste offset in sheet A
    By Agent:Orange in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-19-2011, 07:56 AM
  5. Macro to copy rows from 1 sheet into the next blank row on a different sheet
    By kpratico in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-13-2010, 01:16 PM

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