+ Reply to Thread
Results 1 to 14 of 14

Indirect dropdown not working because of the Offset formula?

  1. #1
    Registered User
    Join Date
    05-02-2015
    Location
    Philippines
    MS-Off Ver
    2010.xlxs
    Posts
    8

    Exclamation Indirect dropdown not working because of the Offset formula?

    I am stuck with getting my indirect dropdown list to work. I have excel 2010.

    I have 2 sheets.

    Sheet 1 is titled: Setup
    Sheet 2 is titled: Detections

    In Sheet 1 are the following:

    Rows A672-A781 I defined as Species_category

    In its defined name are:

    Name: Species_category
    Refers to: =OFFSET(Setup!$A$672,0,0,COUNTA(Setup!$A$672:$A$781),1)

    The list within Species_category will serve as the dropdown list in cell D7 in a sheet titled: Detections
    This list is composed of the following: Whale, Dolphin, Turtle, Fish, Pinniped, Crustacean, Bird, Sirenia, Other

    The range per defined name are in the following cells in the sheet titled: Setup

    Cells B672-B781= Whale
    Cells E672-E781= Dolphin
    Cells H672-H781= Pinniped
    Cells A784-A837= Turtle
    Cells B784-B837= Fish
    Cells E784-E837= Crustacean
    Cells H784-H837= Sirenia
    Cells B840-B950= Birds
    Cells E840-E950= Other

    The reference per defined name is the same offset formula with their exact cell numbers. For example, for Whale it is =OFFSET(Setup!$B$672,0,0,COUNTA(Setup!$B$672:$B$781),1)

    My primary dropdown list in Detections cell D7 works following this formula under Data Validation:

    Allow: List
    Source: =Species_category

    However, my indirect dropdown list in Detections cell E7 is not working. I typed in the formula under Data Validation:

    Allow: List
    Source: =Indirect(D7)

    I am stuck and tried many other formulas and none seem to work. Is it because of my Offset rule? Should I change the formatting somwehere to make this indirect dropdown list work and yet not make blank cells appear in my dropdown list? I want my dropdown list to be dynamic incase additional data needs to be added yet I don't want blank cells to appear.

    I've attached a copy of my excel workbook here so that you can understand what I am talking about and can see my formulas and know exactly what the situation is.
    Attached Files Attached Files
    Last edited by JEM1; 11-05-2023 at 10:40 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,864

    Re: Indirect dropdown not working because of the Offset formula?

    Welcome to the forum.

    Please update your forum profile to say Excel 2010. Do this NOW.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    05-02-2015
    Location
    Philippines
    MS-Off Ver
    2010.xlxs
    Posts
    8

    Re: Indirect dropdown not working because of the Offset formula?

    Thank you for informing me.
    Done.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Indirect dropdown not working because of the Offset formula?

    INDIRECT and OFFSET are both volatile functions, and so they interfere with one another when used together in this way. You should use INDEX to define the named ranges - e.g.:

    Species_category =Setup!$A$672:INDEX(Setup!$A$672:$A$781,COUNTA(Setup!$A$672:$A$781))

    Dolphin =Setup!$E$672:INDEX(Setup!$E$672:$E$781,COUNTA(Setup!$E$672:$E$781))

    and so on.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    05-02-2015
    Location
    Philippines
    MS-Off Ver
    2010.xlxs
    Posts
    8

    Re: Indirect dropdown not working because of the Offset formula?

    Hi Pete,

    Thank you for your suggestion. However, it still did not make my indirect dropdown menu work.

    I made all the changes required with your suggested formula.

    I typed in the cell wherein I want the indirect dropdown list to appear =indirect(d7)

    I got the following error:

    The Source currently evaluates to an error. Do you want to continue?

    I selected YES

    And my indirect dropdown list doesn't work. No selections appear.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,566

    Re: Indirect dropdown not working because of the Offset formula?

    The workbook attached to post #1 has some strange behaviors so I copied the data to another workbook.
    1. Rearrange the species headers into a horizontal arrangement
    2. Select the values in each column of species data by pressing the Ctrl, Shift and the down arrow keys
    3. Press Ctrl, Shift and the F3 keys and when prompted choose to use the top row as the defined name
    Note that if you make adjustments to the data in a species column you can use steps 2 and 3 to quickly change the values that will show up in the dropdown.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    05-02-2015
    Location
    Philippines
    MS-Off Ver
    2010.xlxs
    Posts
    8

    Re: Indirect dropdown not working because of the Offset formula?

    Hi JeteMC,

    Thank you for your spreadsheet. Yes, it works and has worked for me. The dependent drop down list does work for fixed ranges. What I am hoping is for my dependent drop down list to be dynamic as well. Thus my OFFSET formula it their respective defined names.

    The reason I want a dynamic drop down list is because I intend to protect this sheet. This is just an aspect of my workbook. I want the others who will be using my workbook, when completed, to be able to add species when required without risking the formatting of my whole workbook because there are other formulas involved. I also do not want to list all the species per category because that will result in unnecessary scrolling.

    The reason as to why I don't want a fixed range too is because I want the user to know immediately that they have reached the last selection in that drop down list. In a fixed range, the blank cells will show up in the drop down list and this may cause the user time to scroll all the way to the bottom just to be sure they didn't miss anything.

    My work around this is to create another sheet in the workbook where this list will be and use Tables as this will dynamically expand as data is added. However, it will not collapse when data is removed from the list. It is not the best but will do if by the time I need this workbook ready, making my dependent drop down list dynamic is not yet solved.

    No one has 100% confirmed yet that what I want to achieve cannot be done with Excel 2010. I am continuing to search for answers as to how to.

  8. #8
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Indirect dropdown not working because of the Offset formula?

    Try the attached it goes some way towards been dynamically self-maintaining.
    The table headers are used to populate the categories and the sub-categories are determined by the two 'helper' named ranges (CatColNum & SubCatCol)
    Open up the 'Name Manager' you will see the interlinking formula - as these are 'structured table' references these dynamically expand/contract with addition/subtraction of rows and columns from the table.
    Similarly the data entry table DV expands with the addition of rows (put a single character in 'A3' tab to 'B3' and back to 'A3' your table has expanded and the DV has also).
    Attached Files Attached Files
    Last edited by torachan; 11-07-2023 at 02:59 PM.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Indirect dropdown not working because of the Offset formula?

    VBA offering:

    Please Login or Register  to view this content.
    Creates a DV list for any cell selected in Column A: see attached

    code in sheet "Detections" : right-click on tab >> "View Code" >> Copy/paste above code
    Attached Files Attached Files
    Last edited by JohnTopley; 11-07-2023 at 01:16 PM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  10. #10
    Registered User
    Join Date
    05-02-2015
    Location
    Philippines
    MS-Off Ver
    2010.xlxs
    Posts
    8

    Re: Indirect dropdown not working because of the Offset formula?

    Hi Torachan,

    Apologies for my late reply. Your level of excel is way beyond mine so I was taking awhile to understand what you explained. I tested your workbook. I added species under Fish and it didn't show in the drop down. Why is that?

    Also, I don't understand where you applied the following defined names listed below. I click on the formula and the cells it is referring to are not being shown to me.

    - CatColNum
    - SubCatCol
    - Table1

    However, apart from that it appears to be working dynamically.

    Thank you!

  11. #11
    Registered User
    Join Date
    05-02-2015
    Location
    Philippines
    MS-Off Ver
    2010.xlxs
    Posts
    8

    Re: Indirect dropdown not working because of the Offset formula?

    Hi JohnTopley,

    Yes, this appears to be doing exactly what I was envisioning.

    I am not a super excel expert so I would have never thought about VBA.

    Thank you so much!

  12. #12
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Indirect dropdown not working because of the Offset formula?

    My bad, in the CatCol I used a range reference, the technique only works dynamically if the 'structured table' references are used - I have altered it to #Data in the new uploaded file.
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Indirect dropdown not working because of the Offset formula?

    You're welcome and thank for the rep.

  14. #14
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Indirect dropdown not working because of the Offset formula?

    Glad to have helped - thanks for the added rep point.

+ 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] Offset function in dropdown list not working after closing and opening the file
    By Phoenixyz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-17-2022, 10:40 AM
  2. OFFSET or INDIRECT formula - not sure
    By carolynoi in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-09-2016, 07:18 PM
  3. OFFSET+INDIRECT+MATCH formula in VBA.
    By bryenwalt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-05-2010, 04:28 AM
  4. improve formula offset and indirect
    By John Contact in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. [SOLVED] improve formula offset and indirect
    By John Contact in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  6. improve formula offset and indirect
    By John Contact in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  7. [SOLVED] improve formula offset and indirect
    By John Contact in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-17-2005, 03:05 AM

Tags for this Thread

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