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

  • Home
  • SEARCH
  • 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 8725605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:04:30+00:00 2026-06-13T08:04:30+00:00

I have an Excel workbook with two sheets: sheet1 has a large table of

  • 0

I have an Excel workbook with two sheets: sheet1 has a large table of data in columns A to R, headers at row 1. Sheet2 has data in columns A to AO.

Using VBA I am trying to copy rows from sheet1 and paste them to the end of sheet2. Also I need to copy only columns A to R, not the entire row.

In other words, cells A2:R2 from sheet1 need to be copied to first AND second row that don’t have data in column A.

I have the following code that copies the required cells from sheet1, but I cannot figure out how to copy every row twice:

Sub example()
    For Each ce In Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row)
        If Not IsEmpty(ce) Then
            Sheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Resize(1, 18).Value = Range(ce, ce.Offset(0, 17)).Value
        End If
    Next ce
End Sub
  • 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-13T08:04:31+00:00Added an answer on June 13, 2026 at 8:04 am

    Try this:

    Option Explicit
    Sub CopyRows()
        Dim ws1 As Worksheet, ws2 As Worksheet
        Dim i As Integer, k As Integer
        Dim ws1LR As Long, ws2LR As Long
    
        Set ws1 = Sheets("Sheet1")
        Set ws2 = Sheets("Sheet2")
    
        ws1LR = ws1.Range("A" & Rows.Count).End(xlUp).Row + 1
        ws2LR = ws2.Range("A" & Rows.Count).End(xlUp).Row + 1
    
        i = 2
        k = ws2LR
        Do Until i = ws1LR
            With ws1
                .Range(.Cells(i, 1), .Cells(i, 18)).Copy
            End With
    
            With ws2
                .Cells(k, 1).PasteSpecial
                .Cells(k, 1).Offset(1, 0).PasteSpecial
            End With
    
            k = k + 2
            i = i + 1
        Loop
    End Sub
    

    Change Sheet1 and Sheet2 if they are called different things in your workbook.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a excel workbook with two sheets. One sheet is maxed out and
Introduction: Sheet1 in my excel workbook contains a complex table with about 130 columns
We have an Excel workbook which has c# VSTO code in it and two
I have an excel workbook which needs to query data from an HTTP server.
I have an Excel Workbook that has several worksheets in it. The tables in
I have an Excel Workbook which has some VSTO-based c# code. Given a known
So I have an excel workbook that has a nice global map of shaperange
I have an requirement of generating two excel files at once. We are using
I have a Word document with two embedded Excel files (added using Insert ->
I have an Excel 2007 workbook that contains tables of data that I'm importing

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.