+ Reply to Thread
Results 1 to 6 of 6

Macro to copy down columns of data

  1. #1
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Question Macro to copy down columns of data

    Hi,

    I have a work sheet with data in the first 6 columns and I believe the data has a one to many relationship, in that the first four columns i.e. ‘A’ to ‘D’ are only populated once with the remaining two fields ‘E’ and ‘F’ populated down with the Work Order & Comments data until the next record is found.

    What I would like is the macro code to copy and populate the data in the first four columns down ‘A’ to ‘D’ to the next row with data in i.e. in columns ‘A’ to ‘F’.

    Any assistance in this matter would be greatly appreciated.

    Many thanks in advance.


    Rob

    N.B. excel version 2010
    Attached Files Attached Files
    Rob

  2. #2
    Forum Contributor Obsessed's Avatar
    Join Date
    05-22-2013
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 365
    Posts
    215

    Re: Macro to copy down columns of data

    Try:

    Please Login or Register  to view this content.
    Want to show appreciation for the help you received from a member? Give them reps by clicking the bottom left of their post!

  3. #3
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Re: Macro to copy down columns of data

    Obsessed,

    many thanks for you reply it is very much appreciated. I ran the macro and it worked as required...however, when I ran it again to see what would happen I got a 'Run-time error '1004':'. Do you know how to amend the code to check if no data needs to be processed and thus avoid a 'Run-time error'

    Many thanks

    Rob

  4. #4
    Forum Contributor Obsessed's Avatar
    Join Date
    05-22-2013
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 365
    Posts
    215

    Re: Macro to copy down columns of data

    Here you go:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Re: Macro to copy down columns of data

    Obsessed,

    EXCELLENT !!

    Many thanks indeed

    Regards

    Rob

  6. #6
    Forum Contributor Obsessed's Avatar
    Join Date
    05-22-2013
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 365
    Posts
    215

    Re: Macro to copy down columns of data

    No Problem, thanks for the rep!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro Needed to copy data from columns of sheet1 to columns of sheet2
    By 823 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2015, 11:48 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. Macro to filter data and copy the data's from multiple columns based on the criteria
    By millatshawn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-22-2014, 08:14 AM
  4. macro to copy non blank data from 3 columns to the next 3 columns
    By alwinaz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-07-2013, 06:21 AM
  5. Macro to copy 3 columns of data from multiple sheets into 3 columns on 1 sheet
    By bballdcm2007 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-15-2012, 04:37 PM
  6. Macro to copy/Duplicate two columns of data
    By Uzzgee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-29-2012, 01:14 PM
  7. need a macro to add columns and copy data
    By blues2000 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-01-2012, 02:29 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