+ Reply to Thread
Results 1 to 10 of 10

Populate Master workbook with selected cells from all remaining open workbooks

  1. #1
    Registered User
    Join Date
    10-07-2010
    Location
    Clearwater, Florida
    MS-Off Ver
    Excel 2007
    Posts
    8

    Populate Master workbook with selected cells from all remaining open workbooks

    I have attached Master as an example of what my Master workbook looks like. Book2 is an example of the file I need to pull selected cells from and populate into the Master. I typically don't have more than 5 of these open at once.

    Process:
    I will receive emails with up to 5 Book2 like individual workbooks attached. I open them all up. I open the Master workbook after. Unfortunately the filenames I receive are random generated names so can Master check for <> name Master instead of hard code Book2?

    What I need:
    Master to import highlighted cells from Book2, Book3, etc and paste them in the cooresponding highlighted cells in Master. Book2 would be row 2 in Master, Book3 would be row 3, etc. The blank cells in Master row 2 (not highlighted) will be filled out already. If Book3, Book4, Book5, etc exist I need Master to copy the white cells of Master row 2. (example: If Book3 exist, B2 = B3, D2 = D3, E2 = E3, H2 = H3, etc)

    Please let me know if I need to answer any questions. Thank you very much!
    Attached Files Attached Files
    Last edited by marinemerchant; 10-15-2010 at 11:53 AM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Populate Master workbook with selected cells from all remaining open workbooks

    Hi

    I don't see any highlighted cells in your example book2. Exactly which cells from Book 2 are going into Master, and exactly where are they going?

    rylo

  3. #3
    Registered User
    Join Date
    10-07-2010
    Location
    Clearwater, Florida
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Populate Master workbook with selected cells from all remaining open workbooks

    Quote Originally Posted by rylo View Post
    Hi

    I don't see any highlighted cells in your example book2. Exactly which cells from Book 2 are going into Master, and exactly where are they going?

    rylo
    I attached a jpeg screenshot with the two books open to show what goes where. The only thing not showing is if there is a book3, book4 they would have to be dropped down a row. Thank you.
    Attached Images Attached Images

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Populate Master workbook with selected cells from all remaining open workbooks

    Hi

    See how this goes.
    Please Login or Register  to view this content.
    rylo

  5. #5
    Registered User
    Join Date
    10-07-2010
    Location
    Clearwater, Florida
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Populate Master workbook with selected cells from all remaining open workbooks

    This is great. Two things I noticed:
    1) A blank line is created row 2 on Master.xls except for 'DATE' field when I run the code.
    2) I need B2, D2, E2, H2, I2, J2, K2, L2, M2, N2, O2, P2, R2, T2, U2, V2, Y2, Z2, AA2, AB2 copied and pasted on each row populated beyond row 2. Nevermind on this, I figured this out with some logic and your code, thank you.

    I have attached my updated test files, if you run Master's code manually you will see the blank line thing I mentioned in action.
    Attached Files Attached Files
    Last edited by marinemerchant; 10-11-2010 at 04:45 PM.

  6. #6
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Populate Master workbook with selected cells from all remaining open workbooks

    Hi

    You didn't happen to have a blank book1 workbook open when you ran things did you? I have the same thing, but as I have a blank book1 open, it was expected.

    rylo

  7. #7
    Registered User
    Join Date
    10-07-2010
    Location
    Clearwater, Florida
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Populate Master workbook with selected cells from all remaining open workbooks

    Quote Originally Posted by rylo View Post
    Hi

    You didn't happen to have a blank book1 workbook open when you ran things did you? I have the same thing, but as I have a blank book1 open, it was expected.

    rylo
    I do not have a blank book1 open. I am however on a domain network at work. I will not be able to test the files until I get home on my home laptop to see if that is causing the extra line. I do not know what else it could be since I do not have any other books open than the three files I uploaded yesterday, when testing it at work on a domain.
    Last edited by marinemerchant; 10-12-2010 at 10:14 AM.

  8. #8
    Registered User
    Join Date
    10-07-2010
    Location
    Clearwater, Florida
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Populate Master workbook with selected cells from all remaining open workbooks

    Quote Originally Posted by rylo View Post
    Hi

    You didn't happen to have a blank book1 workbook open when you ran things did you? I have the same thing, but as I have a blank book1 open, it was expected.

    rylo
    I tested the exact files I uploaded at home and they did not produce an extra blank line. Domain acts funny, perhaps stores a temp backup file anytime opening Excel *shrug*

    Thank you Rylo for all your help.

  9. #9
    Registered User
    Join Date
    10-07-2010
    Location
    Clearwater, Florida
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Populate Master workbook with selected cells from all remaining open workbooks

    PERSONAL.XLSB was the problem. This file was created, stored, and opened every time excel was open. I saved a macro to excel and not an actual workbook a while ago and it was stored in C:\Documents and Settings\<username>\Application Data\Microsoft\Excel\XLSTART

  10. #10
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Populate Master workbook with selected cells from all remaining open workbooks

    Hi

    Hadn't considered PERSONAL workbooks. Does this mean that you have now finalised this thread? If so, can you please mark it as SOLVED.

    rylo

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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