Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8805959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:59:49+00:00 2026-06-14T01:59:49+00:00

i need to copy a set of data from one excel file to another

  • 0

i need to copy a set of data from one excel file to another excel file.

while pasting i also need to paste them into the next empty row in the desired column.

Is there any macro coding for this process please help me

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T01:59:50+00:00Added an answer on June 14, 2026 at 1:59 am

    If I understand your question correctly all you need to do is:

    • Determine the last row used in the Copy sheet, then
    • Copy from the original into that row + 1.

    Something like this should suffice, though it’s quick and dirty. Also I’ve made it more “detailed” (and therefore less efficient) than it needs to be to try to make the process clearer. (You don’t really need all of the variables that I’ve declared but I’ve put them in to make the logic more transparent.)

    Sub PasteToFollowingRow()
    
        Dim wks As Excel.Worksheet
        Dim rng_Source As Excel.Range
        Dim rng_NextRowDown As Excel.Range
        Dim l_LastRow As Long, l_LastColumn As Long
    
        Set wks = ThisWorkbook.Worksheets("generation_copy")
    
        l_LastRow = wks.UsedRange.Rows.Count
        l_LastColumn = wks.UsedRange.Columns.Count
    
        'Assumes that you'll never copy just one cell...
        If (l_LastRow = 1 And l_LastColumn = 1) Then
            Set rng_NextRowDown = wks.Cells(1, 1)
        Else
            Set rng_NextRowDown = wks.Cells(l_LastRow + 1, 1)
        End If
    
        Set rng_Source = ThisWorkbook.Worksheets("generation").UsedRange
    
        rng_Source.Copy rng_NextRowDown
    
    ExitPoint:
        On Error Resume Next
        Set rng_NextRowDown = Nothing
        Set rng_Source = Nothing
        Set wks = Nothing
        On Error Goto 0
        Exit Sub
    
    ErrorHandler:
        MsgBox "Error " & Err.Number & vbCrLf & Err.Description
    
        Resume ExitPoint
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to copy a set of data from one table to another that
I need to copy a jar file from one directory to another when my
I need to copy data from one database to another with EF. E.g. I
I need to use PHP to copy data from one MySQL database to another.
I need to copy specific data from select set of tables in one SQL
I need to copy a table from one server to another.for that I have
I need to migrate data (varbinary(max)) from one table to another. When executing an
I am trying to copy data from an old database into a new one,
I need to copy files in one directory to another directory where the lastwritetime
In my code, I have a situation where I need to copy data from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.