+ Reply to Thread
Results 1 to 10 of 10

Return value of a consistent cell from many excel worksheets

  1. #1
    Registered User
    Join Date
    07-25-2017
    Location
    London, UK
    MS-Off Ver
    Office 2016
    Posts
    8

    Return value of a consistent cell from many excel worksheets

    I’m constructing a summary document that returns the value of a consistent cell from many excel worksheets located in a shared area (Sharepoint 2016 team site)

    I don’t want to manually reference the cell from each of the source documents (by selecting "=" and then selecting the cell in the source file). There are several hundred source documents - although all are based on the same template so the cell I reference is consistent.

    I have the address of each of the source documents (as a URL) in an excel list.

    How can I construct the formula to fetch the value of that consistent cell into a list within the summary document?

    Many many thanks!

    StKi1da

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Return value of a consistent cell from many excel worksheets

    I assume that you will have a list of workbook names as your starting point. INDIRECT is the best way of picking up a workbook name and returning tha cell value... but for the fact that it doesn't work on closed sheets.


    Try this. Download all 3 sheets to the same location. Open destination.xlsm (enable macros). Adjust the path in column B to suit your PC.

    Happy to explain or modify (if I can - I'm useless with VBA).
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    07-25-2017
    Location
    London, UK
    MS-Off Ver
    Office 2016
    Posts
    8
    Quote Originally Posted by Glenn Kennedy View Post
    I assume that you will have a list of workbook names as your starting point. INDIRECT is the best way of picking up a workbook name and returning tha cell value... but for the fact that it doesn't work on closed sheets.


    Try this. Download all 3 sheets to the same location. Open destination.xlsm (enable macros). Adjust the path in column B to suit your PC.

    Happy to explain or modify (if I can - I'm useless with VBA).
    Ok thanks. Yes i have a list of the documents and as you point out, they cannot be open. I'll download your files shortly and see where that takes me. Tx

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Return value of a consistent cell from many excel worksheets

    OK. I'm away for the night. Back tomorrow sometime...

  5. #5
    Registered User
    Join Date
    07-25-2017
    Location
    London, UK
    MS-Off Ver
    Office 2016
    Posts
    8

    Re: Return value of a consistent cell from many excel worksheets

    Your cells work in themselves. My issue seems to be in specifying the path to the "real" documents.

    Forgive my ignorance - should the INDIRECTEX function work on any sheet - or is it calling some specific code in the worksheet you gave me?

    The Destination.xlsm sits in a master folder, with each source document I want to pull the cell value from sitting in sub-folders within that master folder.

    I modified the code as follows:

    =INDIRECTEX("'SB252263/201780/["&A2&".xlsx]Metrics and QC!$N$29") with the document name sitting in A2

    This does not appear to be returning the value from N29. I'm clearly doing something basic wrong - please correct me!

    Thanks for your help!

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Return value of a consistent cell from many excel worksheets

    I'm out monkeying around... not at the PC.

    Two things. 1. You need to include the FULL path from C:\. 2. You seem to be missing an ' between QC and !

  7. #7
    Registered User
    Join Date
    07-25-2017
    Location
    London, UK
    MS-Off Ver
    Office 2016
    Posts
    8

    Re: Return value of a consistent cell from many excel worksheets

    Thanks. I think my issue is around the path - so I'll gone back to the start!

    As the files are in Sharepoint I seem to have to use a url as the full path and not a C:\ path. This might be causing my issues.

    So this is the formula I'm trying to use. It throws "there is a problem with this formula" and suggests adding a '. When I hit OK, the cursur is located between the : and the first / of the https:// . Anythung I need to do so it recognises the url as the path?

    =IndirectEx(“’https://team.bhj.com/sites/Index/Team Documents/SB104567/201780/[“&A2&”.xlsx]Metrics and QC’!$N$29”)

    Thanks for your patience.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Return value of a consistent cell from many excel worksheets

    Check your single tick. On my (UK) keyboard it's the one on the same key as the @ symbol (namely: ' which is CHAR 39) not the one on the top-leftkey (namely ` which is CHAR 96).

    Worth a try...

  9. #9
    Registered User
    Join Date
    07-25-2017
    Location
    London, UK
    MS-Off Ver
    Office 2016
    Posts
    8

    Re: Return value of a consistent cell from many excel worksheets

    I re-typed just to be sure. This cured this issue - but now I simply get a 0 returned (when the cell is not 0). Very frustrating.

    I've taken a slightly different approach which you might be able to help me complete.

    I manually added the cell reference for the first source doc to the summary sheet (ie = and then navigate to the source and select the cell where the value resides). I copied down this cell and manually edited the reference for the next source location. This worked when the source document was closed.

    Since I have a list of the "source" documents and their paths. I thought I could concatenate and "create" the cell reference.

    So this looks like

    ="'"&[@Column1]&[@Path]&"/["&[@Name]&"]Metrics and QC'!$N$29"

    This creates a cell with the following:

    'https://team.bhj.com/sites/Index/Team Documents/SB240563/200862/[Index _V4_200862_UK.xlsx]Metrics and QC'!$N$29

    This however is the text returned to the cell (it's missing the = ) and I can't seem to add this.

    If I could use this (modified if needed) to pull the value of the cell referenced into the sheet - this would do what I need.

    Obviously happy to pursue your original plan - but I'm struggling to troubleshoot what to me looks like it should be working!

    Happy to entertain suggestions! Thanks for helping with this.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Return value of a consistent cell from many excel worksheets

    I'm out for a longish walk now. It did, however, just occur to me that you probably need to wrap some/all of your formula in a hyperlink function.

    Probably all of it...

+ 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. Array formula does not return consistent result
    By knowleqe in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 06-07-2017, 09:19 AM
  2. [SOLVED] Index and match (compare and return). Not consistent
    By pmw19800 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-26-2017, 04:08 PM
  3. Replies: 8
    Last Post: 03-26-2015, 07:06 AM
  4. Search one cell in all worksheets, return worksheets
    By GaryMallin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-17-2010, 12:37 PM
  5. Consistent Name List between worksheets
    By briansocal in forum Excel General
    Replies: 3
    Last Post: 10-02-2009, 08:01 PM
  6. Keep consistent between two worksheets
    By Hank in forum Excel General
    Replies: 1
    Last Post: 06-28-2006, 11:10 PM
  7. Replies: 0
    Last Post: 06-28-2006, 08:00 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