+ Reply to Thread
Results 1 to 8 of 8

help with data from a second wokbook in the open workbook

  1. #1
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    help with data from a second wokbook in the open workbook

    Hi Team,

    With help from this forum I have become reasonably adept at bringing back a single cell value from another workbook using this code as an example

    Please Login or Register  to view this content.
    My current challenge (ie. issue / problem ) is this:

    I really would like to return a string that is the concatenation of (in this case) cells B6, B7, B8 & B9 but despite experimenting with various code solution have dismally failed to get the right result (the cells in question contain a "fielded" address in an different workbook and I want to "join them together" for simple one line summary display in the primary workbook)

    In practice, I can probably live with just the first cell as that will generally be enough information to the end user but the full address would be much better

    Cheers

    Jmac

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: help with data from a second wokbook in the open workbook

    Hi Jmac,
    try this (code in a standard module)
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: help with data from a second wokbook in the open workbook

    Try recording the concatenation and see what formula it returns.

  4. #4
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: help with data from a second wokbook in the open workbook

    Hi John,

    I recorded the following from within the worksheet. It returns me exactly what I expected to see.

    Please Login or Register  to view this content.
    However I am unable to work out how to translate that into VBA (I have always had difficulty with putting other than very simple formula into VBA. )

    This code brings back the first cell but I cannot get the compiler to agree with my attempts to expand it to include the other cells.

    Please Login or Register  to view this content.
    property_register in second snippet = Property Register V3 5.xlsm and property_id = susa46 from the first example

    I can construct a reasonable workaround but by now my curiosity (or is that frustration??) has kicked in and I figure I shouldn't need to invoke a workaround

    @nilem thanks for your suggestion, at the moment it is likely to be my Plan B or Plan C but I do appreciate the time you took to respond and if I am still stuck it may quickly become my plan A
    Cheers

    Jmac
    Last edited by jmac1947; 04-08-2014 at 04:38 AM. Reason: added comment for @nilem response

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: help with data from a second wokbook in the open workbook

    Without actual worksheets, books and paths, it would be hard for me anyway to understand why the recorded code doesn't give a satisfactory solution. However another suggestion would be to use a helper cell in your property_register workbook to do the concatenation, and then pull off of that cell instead of B6.

  6. #6
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: help with data from a second wokbook in the open workbook

    Hi John,

    I suspect we are at cross purposes here.

    In my last post i included the code generated by the formula in excel itself. It may be that I am mis-understanding your "record the code" so I will give it a different attack this time.

    In the meantime I had already implemented a "helper cell solution" as my "Plan B" so I am happy that you agree this is also a valid option.

    Thanks for your assistance

    Jmac

  7. #7
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: help with data from a second wokbook in the open workbook

    @john H Davis and @nilem

    Thanks again for your suggestions. As I mentioned in my last post I gave "recording" another try but didn't make much progress so as time is of the essence I went for the low tech solution of a helper cell (as also suggested by @john) and that works fine for me, it actually has a side benefit as well as being "low tech and simple" in that I can more easily deal with null components of a fielded address.

    Again, thanks for taking the time to respond, as always I appreciate it

    Jmac

  8. #8
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: help with data from a second wokbook in the open workbook

    You're welcome. Glad to help out and thanks for the feedback.

+ 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. [SOLVED] Copying data from a closed workbook into an open workbook ignoring excel filter?
    By reach78 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 09-17-2013, 12:31 AM
  2. Replies: 6
    Last Post: 01-29-2013, 07:01 AM
  3. [SOLVED] Macro to copy data from open workbook to next open line of new workbook
    By nhtodd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2012, 09:42 PM
  4. 1.Open workbook. 2 copy data. 3 replace data. 4 save workbook.
    By Cristobalitotom in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-05-2006, 07:24 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