+ Reply to Thread
Results 1 to 9 of 9

VBA to copy specific cells and paste to another workbook

  1. #1
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    VBA to copy specific cells and paste to another workbook

    Hey guys,

    I hope you and your families' health are well and I wish all this nightmare will end soon all around the world.

    And I would like ask your help for one VBA my friends.
    There are two workbooks: students.xlsx and verify.xlsx
    In students.xlsx some cells will be copied from active worksheet, and pasted into verify.xlsx - output.xlsx
    1)
    Y2:Z2 to A2:B2
    AL10:AM10 to C2:D2
    BG1:BH3 to E2:J2
    2) K2 will be filled with vlookup value. For student A, Z2 value found in BJ16 so BK16 will be copied to K2 cell in output worksheet.
    3) And when I run same macro, values should be continued to pasted into same columns in Row 3.

    Thanks a lot for your interest guys. Love you all.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA to copy specific cells and paste to another workbook

    How many sheets student there is ?
    Do we do the job for all of them ?
    In which file would you like the macro to be ,recorded ?
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    Re: VBA to copy specific cells and paste to another workbook

    Quote Originally Posted by PCI View Post
    How many sheets student there is ?
    Do we do the job for all of them ?
    In which file would you like the macro to be ,recorded ?
    No @PCI,
    there is no clear number of students or sheets in the source workbook (students.xlsx
    I want to run VBA manually for active worksheet and want to see related cells in the output.xlsx row by row.

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA to copy specific cells and paste to another workbook

    Is it what you want
    Next code to be recorded in a module in file "students.xlsm"
    File "verify.xlsx" must be loaded in Excel
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    Re: VBA to copy specific cells and paste to another workbook

    @PCI
    Thanks a lot for the VBA
    But I have faced with one problem while running VBA
    When there is formula value in related cells to be copied, VBA copied them with Zero value

    How could we fix it? Can you check attached ones please? In verify7 workbook, you'll see desired worksheet when I run our VBA
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA to copy specific cells and paste to another workbook

    Wrong message

  7. #7
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA to copy specific cells and paste to another workbook

    See update to copy only values
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor aaaaa34's Avatar
    Join Date
    12-25-2013
    Location
    Istanbul
    MS-Off Ver
    Windows 10, MS Office 2013
    Posts
    375

    Re: VBA to copy specific cells and paste to another workbook

    Your last VBA met with my needs totally @PCI
    Thanks a lot for your all help once again my friend
    Good night all guys.
    Please take care.
    Wish to see all world healthy soon.

  9. #9
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA to copy specific cells and paste to another workbook

    Thank and the best to you to.
    Thx 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. Copy and paste to another workbook if specific criteria is met VBA
    By numberonelevelit in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-25-2020, 09:05 AM
  2. [SOLVED] VBA for copy/paste specific cells from several sheets into a master data workbook
    By BalanF in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-07-2018, 09:01 AM
  3. [SOLVED] Find specific text within workbook's name, copy and paste it to specific cell
    By axtryo in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-09-2017, 02:57 AM
  4. Copy specific row data with condition and paste into new workbook
    By tdugga in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-23-2013, 06:32 AM
  5. [SOLVED] Copy Specific Cells Across all worksheets in a Workbook and Paste Into single New Workbook
    By thunt13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2013, 10:43 AM
  6. Search, Copy and paste specific field from one workbook to another
    By CARRpeter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-10-2012, 11:16 PM
  7. Macro - Copy Specific Cells in 1 workbook and paste in another.
    By liybpg in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-23-2012, 10:55 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