Results 1 to 2 of 2

Thread: VBA Macro to copy non-adjacent cells to a different workbook

  1. #1
    Neophyte Ziad92's Avatar
    Join Date
    May 2021
    Posts
    1
    Articles
    0
    Excel Version
    365

    VBA Macro to copy non-adjacent cells to a different workbook



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I am currently working on an integrated set of workbooks, where I need to transfer data values between workbooks. In order to do so I need a VBA Macro that can copy non-adjacent cells (ex. the locations of the cells are J4, J8, J12, J16....etc) and insert it in the other workbook with a different structure (ex. the space between the cells would be 4 instead of 3.)



    This is my first time using VBA so I'm not sure if it's possible. I'm using Microsoft 365.

  2. #2
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    2,001
    Articles
    0
    Excel Version
    365
    This is perfectly possible, but your question lacks a lot of detail.
    Perhaps attach a couple of workbooks and be quite specific about where things are to be copied from and where things are to be copied to.

    Also, since you're using Office 365, there may be better ways of getting data from several workbooks into one.

    I note that you've also posted this question elsewhere, namely:
    VBA Macro to copy non-adjacent cells to a different workbook | MrExcel Message Board
    https://www.mrexcel.com/board/thread...kbook.1172005/
    VBA Macro to copy non-adjacent cells to a different workbook
    https://www.excelforum.com/excel-pro...-workbook.html

    This isn't a problem by itself, but for your information, you should always provide links to your cross posts.
    This is a requirement, not just a request. Many forums require the same.
    If you have cross posted at other places, please add links to them too.
    Why? Have a read of http://www.excelguru.ca/content.php?184

    This is a bit weird, because the text of your message is remarkably similar to an 8 year old post at stackoverflow:
    excel - VBA: Copying a cell range to different workbook - Stack Overflow
    https://stackoverflow.com/questions/...erent-workbook

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •