+ Reply to Thread
Results 1 to 11 of 11

macro to copy data to specific columns in same workbooks

  1. #1
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,139

    macro to copy data to specific columns in same workbooks

    Hi All

    I have a workbook with several sheets, sheets breakdown contains data with formula

    however need a macro to automate it insert upload sheet in same workbook

    That is
    breakdown sheet row 2 column B2 and C2 are copied to upload_1 sheet column C and D staring at row 2 still to last data row paste special values only

    breakdown sheet row 2 columns D2 are copied to upload sheet_1 columns I2 starting at row 2 still to last data row paste special values

    breakdown sheet row 2 column G2 and H2 are copied to upload_1 sheet column L2 and M2 AT ROW 2 still to last data row paste special values

    breakdown sheet row 2 column I2 are copied to upload_1 sheet column B2 AT ROW 2 still to last data row paste special values

    breakdown sheet N2 to O2 COPIED to upload_1 sheet A1

    breakdown sheet R2 COPIED to upload_1 sheet E1

    breakdown sheet S2 to T2 COPIED to upload_1 sheet J2 TO K2 and autofill to last data row

    breakdown sheet U2 COPIED TO upload sheet A2 AUTOFILL TO LAST DATA ROW

    The data reads more than 5000 rows.

    Thanks for assistance
    Attached Files Attached Files

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,956

    Re: macro to copy data to specific columns in same workbooks

    Hi Jean1972

    This should get you started:
    Please Login or Register  to view this content.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,139

    Re: macro to copy data to specific columns in same workbooks

    Quote Originally Posted by sintek View Post
    Hi Jean1972

    This should get you started:
    Please Login or Register  to view this content.


    Hi

    Tried but not getting expected results as in upload_1 sample


    DATA BE 1 17049000
    DATA AD 2 UPLOAD 1 18063100
    DATA FF 3 18063200
    DATA ZA 4 19011000
    DATA FFF 5 19012000
    DATA ZA 6 19041000
    DATA SS 7 19051000
    DATA ZA 8 19053100
    DATA ZA 9 19054090
    DATA BE 10 19059090
    DATA AD 11 19059090
    DATA FF 12 20021000
    DATA ZA 13 20051000
    DATA FFF 14 20051000
    DATA ZA 15 20057000
    DATA SS 16 20059900

  4. #4
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,956

    Re: macro to copy data to specific columns in same workbooks

    Sorry...Change
    Please Login or Register  to view this content.
    To
    Please Login or Register  to view this content.

  5. #5
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,956

    Re: macro to copy data to specific columns in same workbooks

    Got my Sheets turned around...Long day lol
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,139

    Re: macro to copy data to specific columns in same workbooks

    Hi sinetek

    thanks ,on right track, need to adjust B1 and C1 on the upload sheet (highlight cells in yellow )

    jean
    Attached Files Attached Files

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,259

    Re: macro to copy data to specific columns in same workbooks

    Change this line

    Please Login or Register  to view this content.
    to this line.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  8. #8
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,956

    Re: macro to copy data to specific columns in same workbooks

    Please Login or Register  to view this content.
    Hi Jean1972, Yep bakerman2 above will fix that right up.

  9. #9
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,139

    Re: macro to copy data to specific columns in same workbooks

    Hi Sintek & Bakerman2

    Works a charm now , save me from a daily copy paste chore

    Thank you both for assistance

  10. #10
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,259

    Re: macro to copy data to specific columns in same workbooks

    You're welcome and thanks for rep+.

  11. #11
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,956

    Re: macro to copy data to specific columns in same workbooks

    Pleasure. Thanks for rep points Jean1972.

+ 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. Replies: 4
    Last Post: 05-04-2015, 05:13 PM
  2. Macro to copy data from specific columns and paste to new workbook
    By jcs2811 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-09-2014, 10:15 PM
  3. Macro to copy data from specific columns and rows to new worksheet.....
    By dleckie in forum Excel Programming / VBA / Macros
    Replies: 35
    Last Post: 05-19-2014, 10:16 PM
  4. Macro to copy values from specific columns from different workbooks to one sheet
    By sksajid7 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-11-2013, 09:50 AM
  5. Replies: 8
    Last Post: 04-04-2013, 08:02 PM
  6. Macro to copy specific data to specific columns from a pivot table
    By Raju Radhakrishnan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2012, 07:24 PM
  7. Copy specific columns from mult workbooks to seperate workbook
    By excelgrrl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2009, 10:12 AM

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