+ Reply to Thread
Results 1 to 8 of 8

Copy range from another workbook with wildcards

  1. #1
    Forum Contributor Pierce Quality's Avatar
    Join Date
    07-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    221

    Copy range from another workbook with wildcards

    Hi All,

    I'm attempting to write a macro to copy a range from another open workbook, then paste that data into the workbook that the macro is in. What I have so far works fine in tests, but in the real world there will be some variables I need to address.

    There may be other open work books at the time the macro is run.

    The entire target workbook name will be unkown, but will always contain "Changes"

    The entire target worksheet name will be unkown, but will always contain "Changes"

    Here is the code I am working with:

    Please Login or Register  to view this content.
    Any help would be greatly appreciated, thanks!

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Copy range from another workbook with wildcards

    try using the like function :

    Please Login or Register  to view this content.
    Apply the same logic for the worksheet.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Forum Contributor Pierce Quality's Avatar
    Join Date
    07-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Copy range from another workbook with wildcards

    Quote Originally Posted by xlbiznes View Post
    try using the like function :

    Please Login or Register  to view this content.
    Apply the same logic for the worksheet.
    Hello xlbiznes thanks for the reply!
    This is what I have so for, but I am getting a 'Next without For' error now.

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Copy range from another workbook with wildcards

    shall i also include the code to check the sheet name for the like condition "*Changes*" ?

  5. #5
    Forum Contributor Pierce Quality's Avatar
    Join Date
    07-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Copy range from another workbook with wildcards

    Quote Originally Posted by xlbiznes View Post
    shall i also include the code to check the sheet name for the like condition "*Changes*" ?
    Yes please, it would help me out greatly.

    Thanks!

  6. #6
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Copy range from another workbook with wildcards

    here you go,

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor Pierce Quality's Avatar
    Join Date
    07-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: Copy range from another workbook with wildcards

    Quote Originally Posted by xlbiznes View Post
    here you go,
    This is perfect, thank you very much, this really helped me out!

    Marking this as solved!

  8. #8
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Copy range from another workbook with wildcards

    You are welcome.

+ 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 range from one workbook, paste to next empty cell in another workbook
    By glock9mm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2013, 12:16 AM
  2. VBA to copy range from one workbook and paste to another open workbook
    By lilvictorians in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-24-2013, 03:06 PM
  3. Copy/Paste range of data excluding certain rows and copy to another workbook
    By HoerbigAdm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-12-2012, 02:51 PM
  4. Macro, copy UNLOCKED cell range of sheet in open workbook to workbook template
    By NicksDad in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-31-2012, 11:18 AM
  5. Simple task: Open a workbook, copy a range, paste into another workbook
    By fbonetti in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-21-2011, 01:12 PM

Tags for this Thread

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