+ Reply to Thread
Results 1 to 6 of 6

Copy to another workbook with conditions

  1. #1
    Forum Contributor
    Join Date
    01-14-2020
    Location
    Pakistan
    MS-Off Ver
    15
    Posts
    123

    Copy to another workbook with conditions

    Hi Gurus,

    I've a very basic knowledge about VBA programming and I'm hoping you will be able to help me. I have attached 2 spreadsheet : 1. Copy From and 2. Copy to

    All I want is to copy data from Copy from to Copy to in specific columns. The headers are already there, just need a macro to copy numbers over to another worksheet.

    In Copy From sheet there is a title "North" in "T3" - so the section has to be copied in North section in another spreadsheet.

    I really hope you experts can help me with this.

    Many thanks in advance.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Copy to another workbook with conditions

    Hi, why not use formulas in stead of copying, like
    Please Login or Register  to view this content.
    See attachment
    Cheers
    Erwin
    Attached Files Attached Files
    I started learning VBA because I was lazy ...
    Still developing.... being more lazy...

  3. #3
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Copy to another workbook with conditions

    Or use this macro:
    Please Login or Register  to view this content.
    Cheers
    Erwin
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    01-14-2020
    Location
    Pakistan
    MS-Off Ver
    15
    Posts
    123

    Re: Copy to another workbook with conditions

    Hi Erwin,

    Thank you for the reply.

    I'm trying to put this code in the original spreadsheet and it's coming up with an error message "Subscription out of range". I have changed the column/row numbers only.

    Please can you guide me the reason for this error.
    Many thanks,





    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Copy to another workbook with conditions

    Hi, that could be anything if you don't tell me at what line this error occurs.
    Does it still happens when you replace the last few lines with this:
    Please Login or Register  to view this content.
    otherwise you have to upload the target workbook.
    Cheers
    Erwin

  6. #6
    Forum Contributor
    Join Date
    01-14-2020
    Location
    Pakistan
    MS-Off Ver
    15
    Posts
    123

    Re: Copy to another workbook with conditions

    Thanks Erwin
    All sorted.
    Once again thank you for the help

+ 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. two conditions on workbook open
    By sknalodz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-29-2019, 08:57 AM
  2. Replies: 3
    Last Post: 12-07-2017, 05:14 PM
  3. Copy paste cell from workbook to another under certain conditions
    By Cicada in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2014, 11:52 AM
  4. Copy certain cells from one workbook to another (under certain conditions)
    By dvs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-01-2014, 04:33 PM
  5. Copy to new workbook based on conditions
    By supermouse13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2013, 02:51 PM
  6. [SOLVED] Copy Values From Each Workbook in Folder to a Single Sheet in New Workbook +Workbook names
    By Arsham24 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-21-2012, 07:42 PM
  7. [SOLVED] Copy multiple rows from different sheets given two conditions to a new workbook
    By testingandroid in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2012, 04:38 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