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 927093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:47:46+00:00 2026-05-15T19:47:46+00:00

I have the following vba: Data is all text, Rows A – J with

  • 0

I have the following vba:
Data is all text, Rows A – J with column headers on every sheet are the same
Data is sql queries all with "top 1000"
4 sheets (sheet1, sheet2, sheet3, Master)

sheet 1: 100 rows
sheet 2: 34 rows
sheet 3: 900 rows
Master: merged data from 3 sheets

PROBLEM: Sheet3 only copies 84 rows specifically however adding more rows to other sheets will copy over to Master. Only sheet3 will not copy more than 84 rows.

'   Step 1: Clear master before updating
'   Step 2 : Loop through the regional sheets

 Sub Consolidate()

    Dim cell            As Range
    Dim wks             As Worksheet

    Sheets("Master").Range("A2:Z65536").ClearContents

    For Each wks In ThisWorkbook.Worksheets
        If wks.Name <> "Master" And wks.Range("A2") <> "" Then
        
            For Each cell In wks.Range(wks.Range("A2"), wks.Range("A2").End(xlDown))
                 cell.EntireRow.Copy Destination:=Worksheets("Master").Range("A65536").End(xlUp).Offset(1, 0)
            Next cell
        End If
    Next wks
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-05-15T19:47:46+00:00Added an answer on May 15, 2026 at 7:47 pm

    Is the data starting in Range(A2) always populated?

    The For Each cell In wks.Range(wks.Range("A2"), wks.Range("A2").End(xlDown)) will start from A2 and go to the last populated cell before a blank/empty cell.

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

Sidebar

Related Questions

I have data in an excel sheet in the following format: ItemCode DeliveryDate 5456987
I have the following query in VBA: DoCmd.RunSQL INSERT INTO table (value) VALUES ('example')
I have following script that executes all the .reg files in the current directory.
I have data stored in some column (Say, Column A). The length of Column
Win-XP / Excel 2003 / VBA .... I have the following piece of code
Provided I have the data in following format in the DB: +--------+--------+-------+ | Server
I have the following vba-code in an MS-Access97-frontend which opens a word-document stored on
I've got a sheet setup with the following VBA: Sub PrintPDF() Application.DisplayAlerts = False
I have the following VBA code inside an Excel macro: With ActiveSheet.QueryTables.Add( _ Connection:=ConnStr,
I have the following vba code to find occurrences of 0 in a following

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.