+ Reply to Thread
Results 1 to 3 of 3

Dynamic List from other Sheets - Auto adjustment if row/column inserted in others sheets

Hybrid View

  1. #1
    Registered User
    Join Date
    02-16-2020
    Location
    Europe
    MS-Off Ver
    2016
    Posts
    5

    Dynamic List from other Sheets - Auto adjustment if row/column inserted in others sheets

    Hello Guys,

    I have a challenge for you. Here is the situation:

    I would like to have in let's call it Main Sheet, values that come from different Sheets. Let's call them Sheet2, Sheet3 etc.

    The idea is to have a drop-down list in Main Sheet where I can select the other Sheet names and then the data appears (with some INDEX/MATCH).

    I have used INDIRECT to refer to another Sheet. But the problem comes with the non dynamic part of INDIRECT namely the range.

    What I would like is these ranges/cells to be dynamic so if I insert a row or column in another Sheet, it will automatically change, keeping the same data in Main Sheet.

    Here is the formula:

    IFERROR(INDEX(INDIRECT("'"&$B$2&"'!$B$3:$B$6"),MATCH(INDIRECT("'"&$B$2&"'!$A"&ROW(3:3)),INDIRECT("'"&$B$2&"'!$C$3:$C$6"),0)),"")

    If I insert a column in Sheet 2 before where the formula looks at to extract data (so $B$3:$B$6 for example), it will not understand because range will be locked while the actual data range would have moved to column C.

    I don't know if it is possible to do it via Excel without VBA as it seems quite complex. I have attached a sample.

    Let me know your thoughts

    Many thanks
    Attached Files Attached Files
    Last edited by QuentinLDN; 09-16-2020 at 05:00 AM.

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

    Re: Dynamic List from other Sheets - Auto adjustment if row/column inserted in others shee

    You could use Named Ranges on Sheet1 and Sheet2 and refer to them in the INDIRECT function. The Named Ranges would be "dynamic" when a row or column is inserted.

    In this example, the named ranges are called Sheet1rng and Sheet2rng and encompass A3:C6 on each sheet. Using the Sheet's name at the beginning of the named range makes it convenient to reference the B2 dropdown value and add "rng" to the name.

    Formula: copy to clipboard
    =INDEX(INDIRECT($B$2&"rng"),MATCH(INDEX(INDIRECT($B$2&"rng"),ROW(1:1),1),INDEX(INDIRECT($B$2&"rng"),0,3),0),2)
    Last edited by AlphaFrog; 09-17-2020 at 05:05 AM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,643

    Re: Dynamic List from other Sheets - Auto adjustment if row/column inserted in others shee

    To refer to cell in row 3 column B of a dynamic sheet name in B2, why not? (No helper, ofcourse):

    =INDIRECT("'"&$B$2&"'!$B"&ROW(3:3))

    To avoid "Zero" from blank cell, try:

    =IF(INDIRECT("'"&$B$2&"'!$B"&ROW(3:3))=0,"",INDIRECT("'"&$B$2&"'!$B"&ROW(3:3)))
    Drag down as far as probably need.
    Attached Files Attached Files
    Quang PT

+ 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. Create a dynamic list from multiple sheets
    By shbiskup in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-28-2022, 04:04 AM
  2. [SOLVED] Generate dynamic list of Sheets
    By llamafarmer in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-21-2019, 08:55 AM
  3. Compare Sheets and Display the previous sheets column in current sheets
    By maddyrafi1987 in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 05-09-2017, 04:03 AM
  4. [SOLVED] Select all sheets from a dynamic list
    By rousseauassociates in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-23-2016, 05:14 AM
  5. [SOLVED] Create a Dynamic Master List from 10 different sheets.
    By djshane in forum Excel General
    Replies: 3
    Last Post: 06-12-2016, 05:06 AM
  6. Replies: 7
    Last Post: 07-29-2014, 11:10 AM
  7. Replies: 1
    Last Post: 02-25-2013, 11:37 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