+ Reply to Thread
Results 1 to 6 of 6

Updating Workbook cell reference based on current worksheet cell value

  1. #1
    Registered User
    Join Date
    12-13-2011
    Location
    South Carolina
    MS-Off Ver
    Office 2007
    Posts
    16

    Updating Workbook cell reference based on current worksheet cell value

    Greetings all,

    I do a monthly KPI report. I need to reference cells from other workbooks. While the cell number doesn't change, the path does. The existing cell ref looks like this:
    =sum('G:\Transportation\Driver Pay Sheet\New Pay Sheets\2019 Pay Sheets\December\[12-5-19.xlsx]KPI'!$D$72)

    How can I set it up so the year, month, and date of the reference change based on the values I would input on the open KPI sheet?
    I currently use control H. I have also played with (B2)\[(B4).xlsx]KPI'!$D$72) and INDIRECT. I'm having a tough time "googlesplaining" it to get a positive outcome. I'm hoping you can help. Thank you in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Updating Workbook cell reference based on current worksheet cell value

    Hi,

    I think that this should return in G5 the value you're looking for..

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Any help?
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    12-13-2011
    Location
    South Carolina
    MS-Off Ver
    Office 2007
    Posts
    16

    Re: Updating Workbook cell reference based on current worksheet cell value

    Thank you Sweep. Unfortunately, I am getting a #ref error. I walked back through the reference and I'm not see anything missing.

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Updating Workbook cell reference based on current worksheet cell value

    Do you have the sheet that you're referencing open?

  5. #5
    Registered User
    Join Date
    12-13-2011
    Location
    South Carolina
    MS-Off Ver
    Office 2007
    Posts
    16

    Re: Updating Workbook cell reference based on current worksheet cell value

    I did not, but do now. Still have the ref error. I also opened a new workbook to start anew and have the same result.

  6. #6
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Updating Workbook cell reference based on current worksheet cell value

    INDIRECT doesn't work with closed workbook. So it's not right way to use it. The changes must be done manually or by small script.

    Remark - the sum function is useless here if only one cell in the source range.

+ 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: 5
    Last Post: 01-19-2017, 04:18 PM
  2. [SOLVED] Reference a WB with filename based on cell value in current WB(subscript out of range)
    By cloudberr in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-12-2016, 11:35 AM
  3. Replies: 1
    Last Post: 11-09-2015, 09:30 PM
  4. [SOLVED] Reference cell on another worksheet based on value on current sheet
    By clocke in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-19-2014, 12:24 PM
  5. [SOLVED] Reference Cell in current workbook whilst using Camera Tool
    By RichTea88 in forum Excel General
    Replies: 3
    Last Post: 07-17-2013, 08:55 AM
  6. [SOLVED] Macro to open workbook and go to specific worksheet based on cell reference
    By ajmartin17 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2013, 10:44 AM
  7. [SOLVED] Copying data from external workbook into current workbook based on cell value
    By Brontosaurus in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-07-2012, 11:17 AM

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