+ Reply to Thread
Results 1 to 11 of 11

Having Two Excel Workbooks Open at a Time

  1. #1
    Registered User
    Join Date
    04-08-2013
    Location
    Cape Cod
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    9

    Question Having Two Excel Workbooks Open at a Time

    Hello, to all ...... This is my 1st post here in this forum.

    My question is if I have two open Excel workbooks without knowing the either path of each workbook and there named differently but in the same folder.

    Is it possible to reference one to the other workbook only in sheet1 of each workbook for matching cells from, or the other with out know the any file path?

    I would either manually open the two workbooks which is ok. or maybe a popup and enter there names might be ok.

    If so, could you please help me out.

    I like only to highlight matching cells. Weather they are text or numeric values in the cells. only thru C11:H25 Except for blanks cells.

    I not sure if it can be done. I been trying so many codes on the net and in other forums but cant accomplish this.

    Thanks So Many, Tom

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Having Two Excel Workbooks Open at a Time

    Hi and welcome to the forum

    You can reference 1 W/B from another (both opened), by just pointing to the cell in the 2nd W/B. It will create a link that you can save with rthe file
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,624

    Re: Having Two Excel Workbooks Open at a Time

    Not exactly clear; however, given two open workbooks: WorkbookA.xlsx and WorkbookB.xlsx

    In WorkbookA.xlsx a formula like:
    Please Login or Register  to view this content.
    will return a value from WorkbookB.xlsx to WorkbookA.xlsx (the one with the formula).
    Ben Van Johnson

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Having Two Excel Workbooks Open at a Time

    This prompts you to open two workbooks then compares C11:H25 on sheet1 of both opened workbooks.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-08-2013
    Location
    Cape Cod
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    9

    Re: Having Two Excel Workbooks Open at a Time

    Hi ,Thanks for all the quick replies.....

    AlphaFrog, I believe you are on to somthing but its not working for me as of yet.

    I place your code in a module and ran it. It will promt you to open another file ok.

    But does not highlight any cells nor a message box does not appear.

    After I open a second workbook from the folder it promts again. When canceled button is clicked to not open a thrid workbook I think it fails and doesnt highlight anything.

    the code does not error

    Any ideas from this write back


    Regards Tom

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Having Two Excel Workbooks Open at a Time

    It is designed to run from a Master 3rd workbook. It prompts you to open two other files. It will compare the two prompted workbooks. If you cancel either of the two open-workbook-prompts, it quits without doing a comparison.


    The new code below prompts to open one workbook and compares the workbook with the macro code to the prompted workbook.
    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 04-08-2013 at 06:27 PM.

  7. #7
    Registered User
    Join Date
    04-08-2013
    Location
    Cape Cod
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    9

    Re: Having Two Excel Workbooks Open at a Time

    AphaFrog, That is Awesome, Many Many Thank's...... I been in other forums ect... trying to mend codes and ask for help for weeks now.

    This is really special for me thank's to you! Plus, with a quick response time. I will try this out completely. I will let you know how I make out.

    Thank's a million and As said I can't thank you enough Tom

  8. #8
    Registered User
    Join Date
    04-08-2013
    Location
    Cape Cod
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    9

    Re: Having Two Excel Workbooks Open at a Time

    Hi once more,
    Then I will not bug you anymore with this code, Can the highlighted cells be unhighlighted upon closing the workbooks?

    Regards Tom

  9. #9
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Having Two Excel Workbooks Open at a Time

    If you don't save the workbooks, the highlights are lost.

    Or just record a macro. While recording, select range C11:H25 and then select no fill from the menu interior color-picker.

  10. #10
    Registered User
    Join Date
    04-08-2013
    Location
    Cape Cod
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    9

    Re: Having Two Excel Workbooks Open at a Time

    Thanks AlphaFrog, I will try this out. I never recorded a macro but I will try.


    Regards, Tom

  11. #11
    Registered User
    Join Date
    04-08-2013
    Location
    Cape Cod
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    9

    Re: Having Two Excel Workbooks Open at a Time

    AlhaFrog, I recorded My 1st macro

    It certainly work upon closing the workbooks.

    Also,
    I created a masterbook as your 1st Reply code was to be

    This works much better than I even wished for now I know what you had meant.

    Thank's for all your help with this

    "Considered Accomplished "
    Tom

+ 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