+ Reply to Thread
Results 1 to 4 of 4

Dynamic References Based on Two Criteria (INDIRECT OR VLOOKUP?)

  1. #1
    Registered User
    Join Date
    11-08-2015
    Location
    Dallas, TX
    MS-Off Ver
    Office 2010
    Posts
    2

    Dynamic References Based on Two Criteria (INDIRECT OR VLOOKUP?)

    Hello all,

    I've been lurking on the forums for awhile now to fix most of my Excel headaches, but this particular problem has gotten me vexed enough to start up an account and ask for help! Who knows, maybe I can contribute a thing or two, as well. Anyway, glad to be here and thankful for any help that can be provided.

    I have a running spreadsheet that tracks the same key bits of information over time. Each date is a new [EDIT] worksheet and each workbook contains data for 13 hours of the day for 16 variables. I am trying to create a simple summary page where I can type the date and time I want to pull data from and have each dataset populate from the appropriate workbook and time.

    The [EDIT] worksheets are set up something like this (workbook is named 11.08.15 in this example)

    A B C D E
    1 8:00 AM Occupied Rooms Occupied %

    2 9:00 AM 855 55%

    3 10:00 AM 856 55.01%

    4 11:00 AM 900 57%

    5

    The first worksheet (Titled "Copy This") is where I want to be able to dynamically pull summary information and looks something like this:

    A B C D E

    1 Enter Date Here: (I want to be able to enter a date here, which would reference the workbook by the same name)

    2 Enter Time Here: (This is the second search criterion, and should identify the row from which to pull the data)

    3 Occupied Rooms: (By entering the two criteria above, this should reference !B and the corresponding row from the time)

    4 Occupied %: (Same as above)

    5

    I've tried an INDIRECT function to reference the variable worksheets, I've toyed with INDEX, MATCH and VLOOKUP but I can't hit the formula to be able to get the spreadsheet to do what I want.

    Any help you can provide would be awesome!

    Thanks,
    hotelguy
    Last edited by hotelguy; 11-08-2015 at 09:45 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Dynamic References Based on Two Criteria (INDIRECT OR VLOOKUP?)

    Hi,

    INDIRECT() won't work with closed workbooks. Why not have a macro that opens the workbook and then builds the Indirect() functions?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    11-08-2015
    Location
    Dallas, TX
    MS-Off Ver
    Office 2010
    Posts
    2
    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    INDIRECT() won't work with closed workbooks. Why not have a macro that opens the workbook and then builds the Indirect() functions?
    Made a rookie typo - it's all in one workbook and I'm referencing different sheets. Hopefully that can make it work without having to dive into macros (I'm net quite there yet!).

  4. #4
    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,959

    Re: Dynamic References Based on Two Criteria (INDIRECT OR VLOOKUP?)

    Hi, welcome to the forum

    Often, a copy/paste doesnt work out quite as you wanted it to Can I suggest that you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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

+ 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. Indirect search criteria to dynamic list
    By T86157 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-23-2015, 12:29 PM
  2. [SOLVED] Using Indirect() to get dynamic references in an array formula
    By jlb333333 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-18-2015, 10:37 AM
  3. VLOOKUP with indirect references?
    By Hambone70 in forum Excel General
    Replies: 4
    Last Post: 12-09-2014, 03:23 PM
  4. Replies: 6
    Last Post: 10-22-2014, 09:07 AM
  5. [SOLVED] Dynamic VLOOKUP wit INDIRECT reference
    By supern0va in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-29-2012, 11:44 AM
  6. Replies: 1
    Last Post: 02-18-2012, 10:31 AM
  7. VLOOKUP and indirect references
    By sportsaim in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-26-2008, 06:12 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