+ Reply to Thread
Results 1 to 8 of 8

Copy Same Cells for Each Workbook in Folder...Frustrated

  1. #1
    Registered User
    Join Date
    07-11-2012
    Location
    Ocean Springs
    MS-Off Ver
    Excel 2007
    Posts
    4

    Copy Same Cells for Each Workbook in Folder...Frustrated

    Hello,

    I'm a VBA novice and I have found the following code to copy certain non-contiguous cells from each sheet in each workbook to a destination summary workbook. The code works well except I want to add the last used cell of column B to the source range because it varies between sheets. All the other cells are in the same position. I have tried to use xlEndUp to determine the last row for each sheet to no avail. I have tried to add B&LastRow to the source range and then I get no data after it cycles through the 30 files in the directory. It is probably something simple, but it is driving me up the wall. Any help is appreciated.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Copy Same Cells for Each Workbook in Folder...Frustrated

    Hi Jake,

    Try:
    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    07-11-2012
    Location
    Ocean Springs
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Copy Same Cells for Each Workbook in Folder...Frustrated

    xladept,

    Thanks, that worked!

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Copy Same Cells for Each Workbook in Folder...Frustrated

    You're welcome!

  5. #5
    Registered User
    Join Date
    07-11-2012
    Location
    Ocean Springs
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Copy Same Cells for Each Workbook in Folder...Frustrated

    For some reason, the cell E7 is not included in the data. Is there anything in the Code that would prevent that?

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Copy Same Cells for Each Workbook in Folder...Frustrated

    Can there be some other reason?? If not I'll need to see a sample:

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  7. #7
    Registered User
    Join Date
    07-11-2012
    Location
    Ocean Springs
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Copy Same Cells for Each Workbook in Folder...Frustrated

    It seems to be that E7 is a date field. If I substitute a non-date cell, it works fine.

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Copy Same Cells for Each Workbook in Folder...Frustrated

    Maybe:

    Please Login or Register  to view this content.

+ 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: 1
    Last Post: 01-06-2015, 10:13 AM
  2. Copy a Range from each workbook in a folder to another folder
    By Romina in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-06-2015, 05:44 AM
  3. Macro to copy cells from all worksheets found in all closed workbook in a network folder
    By Chrispelletier in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2014, 10:26 AM
  4. Replies: 4
    Last Post: 05-08-2014, 02:47 PM
  5. [SOLVED] VBA Code open files in folder, copy text to workbook-Next time folder opened copy only new
    By Bikeman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-02-2013, 07:59 PM

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