• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Dependent Drop Lists|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Dependent Drop Lists|VBA & Macros|Excel Forum|My Online Training Hub

vba course banner

Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosDependent Drop Lists
sp_PrintTopic sp_TopicIcon
Dependent Drop Lists
Avatar
Shawn Wallack
Member
Members
Level 0
Forum Posts: 77
Member Since:
December 7, 2021
sp_UserOfflineSmall Offline
1
June 10, 2022 - 7:10 am
sp_Permalink sp_Print sp_EditHistory

The attached XLS shows a user-generated list of teams and players.

  • Each player is on a team
  • A team may be active or inactive (as indicated by the "Include in Droplist" fields)
  • A player may also be active or inactive
  • If an active player is on an inactive team, then the player is considered inactive

As per the guidance I received on this forum, I use pivot tables to restrict the selection of teams and players to only those that are active.

If a user picks a player, it's no problem to look up that player's team. 

The problem is how to show which players belong to a selected team:

  • All players on a selected team
  • Active players on a selected team
  • Inactive players on a selected team

Thanks!   

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1824
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
2
June 16, 2022 - 12:50 am
sp_Permalink sp_Print

Hi Shawn,

Change the pivot structure to display the team name, not just the team member.

The pivot should look like this:

Team Player
Cubs    Bill
Cubs    Mary
Tigers  Sally

 

With a formula like this one below, you'll be able to get the list of players of the selected team.

=OFFSET(D1,MATCH("Cubs",D:D,0),1,COUNTIF(D:D,"Cubs")) (where column D is the one where the Team column of the pivot table is located.

Avatar
Shawn Wallack
Member
Members
Level 0
Forum Posts: 77
Member Since:
December 7, 2021
sp_UserOfflineSmall Offline
3
June 16, 2022 - 11:57 pm
sp_Permalink sp_Print

Thank you for your suggestion I'm sorry, but I am still struggling to make this work. Please see the updated XLS attached. 

In your example, "Cubs" is hard-coded, so I replaced this with a reference to the cell in which the "TEAM" droplist selection is made by the user. This is "I7" in the new XLS.

The "TEAM" column of the pivot table is actually located on "Droplists!$D$4," so I replaced your "D" with that reference.

So, your original formula:

=OFFSET(D1,MATCH("Cubs",D:D,0),1,COUNTIF(D:D,"Cubs"))

Becomes this new formula:

=OFFSET(Droplists!$D$4,MATCH(I7,Droplists!$D:$D,0),1,COUNTIF(Droplists!$D:$D,I7))

The problem is that I always get a blank list.

As always, thanks for your help.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Jorn Bast, Malcolm Sawyer
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 216
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Melanie Ford
Isaac Felbah
Adele Glover
Hitesh Asrani
Rohan Abraham
Anthony van Riessen
Erlinda Eloriaga
Abisola Ogundele
MARTYN STERRY
Rahim Lakhani
Forum Stats:
Groups: 3
Forums: 24
Topics: 6355
Posts: 27792

 

Member Stats:
Guest Posters: 49
Members: 32324
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.