Results 1 to 7 of 7

Problem with Macro to Copy Data Rows

Threaded View

  1. #1
    Registered User
    Join Date
    01-04-2017
    Location
    Wellington, NZ
    MS-Off Ver
    2013
    Posts
    8

    Problem with Macro to Copy Data Rows

    Hi there,

    I've used the following macro to copy data from templates people fill out and paste into a master file.

    With wb.Sheets("Details")
        .Range("A5:I" & .Range("D5").End(xlDown).Row).Copy
    End With
    The data starts from row 5 and I used column D to decide which rows to copy and paste

    It works fine for spreadsheets that have 2 or more rows filled out. However, it doesn't seem to work for some spreadsheets that have 1 row of data only. Is there anything I can do to make this work for spreadsheets with 1 row of data?

    Thanks in advance for your help
    Last edited by zenjah; 05-07-2017 at 05:32 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Excel Macro - Copy & Paste (Font) problem & Delete Last Added Rows problem
    By LennartB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2015, 06:58 AM
  2. Macro to copy data from 3 different worksheets with different columns and rows of data
    By Louise_Hughes in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-12-2014, 07:38 AM
  3. Replies: 10
    Last Post: 11-01-2012, 06:23 PM
  4. Replies: 0
    Last Post: 08-10-2012, 03:09 AM
  5. Problem with a recorded macro overwriting data in rows
    By mikep1110 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2012, 08:43 AM
  6. Problem with a recorded macro overwriting data in rows
    By mikep1110 in forum Excel General
    Replies: 2
    Last Post: 08-01-2012, 10:04 PM
  7. Replies: 2
    Last Post: 04-21-2011, 07:13 PM

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