Home

Help with formula

%3CLINGO-SUB%20id%3D%22lingo-sub-875597%22%20slang%3D%22en-US%22%3EHelp%20with%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-875597%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20remove%20the%20blank%20selections%20from%20a%20dependent%20drop%20list%20I%20have%20created%20in%20Excel%20and%20I%20am%20having%20a%20hard%20time%20figuring%20out%20what%20the%20formula%20would%20be%20to%20get%20this%20accomplished.%20A%20little%20background%2C%20I%20have%20a%20table%20with%20two%20columns%20in%20the%20first%20column%20I%20have%20a%20drop%20down%20list%20feeding%20off%20of%20another%20sheet%20to%20get%20the%20manager%20names%2C%20formula%20is%20%3DSheet1!%24A%241%3A%24EO%241.%20Then%20in%20second%20column%20I%20have%26nbsp%3Ba%20dependent%20drop%20down%20list%20that%20will%20populate%20specific%20portfolios%20based%20off%20the%20manager%20I%20had%20selected%20in%20the%20first%20column%2C%20formula%20is%20%3DINDEX(Sheet1!%24A%242%3A%24EO%2467%2C%2CMATCH(%24A%245%2CSheet1!%24A%241%3A%24EO%241%2C0)).%20The%20problem%20I%20am%20having%20is%20that%20most%20of%20the%20managers%20only%20have%20about%205%20portfolios%20but%20one%20of%20those%20has%20about%2065%20portfolios%2C%20so%20when%20I%20select%20one%20of%20the%20smaller%20ones%20I%20have%20a%20bunch%20of%20blank%20spaces%20in%20my%20drop%20down%20list.%20Any%20help%20on%20how%20to%20get%20this%20resolved%20would%20be%20welcomed.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-875597%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%20-%20formulas%20data%20worksheet%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-876087%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-876087%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F415284%22%20target%3D%22_blank%22%3E%40H1D3F%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eif%20the%20different%20managers%20have%20varying%20numbers%20of%20portfolios%2C%20then%20you%20need%20a%20distinct%20range%20for%20each%20manager%20that%20includes%20only%20the%20rows%20of%20data%20for%20that%20manager.%26nbsp%3B%20In%20the%20attached%20spreadsheet%20you%20find%20three%20managers%20with%20three%20different%20range%20names.%20They%20have%20been%20created%20by%20selecting%20the%20manager%20name%20and%20the%20cells%20with%20text%20below%20it%2C%20then%20using%20Insert%20%26gt%3B%20Name%20%26gt%3B%20Create%20with%20the%20default%20to%20use%20the%20text%20in%20the%20top%20row%20for%20the%20range%20name.%20Any%20space%20in%20the%20range%20name%20will%20be%20replaced%20with%20an%20underscore.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20range%20name%20for%20portfolio%20uses%20the%20formula%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DINDIRECT(SUBSTITUTE(Sheet1!%24A3%2C%22%20%22%2C%22_%22))%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20replaces%20the%20space%20in%20column%20A%20with%20an%20underscore%20and%20then%20uses%20that%20string%20to%20refer%20to%20the%20range%20name.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-876211%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-876211%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F415284%22%20target%3D%22_blank%22%3E%40H1D3F%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20check%20the%20attached%20file.%20you%20can%20find%20the%20explanation%20of%20the%20formula%20in%20below%20wep%20page%2C%20in%20the%20second%20tab.%20It%20is%20in%20Turkish%20however%20you%20can%20use%20web%20translator.%20(BA%C4%9E_DE%C4%9E_DOLU_SAY%20is%20COUNTA).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fexcelileharikalar.com%2Findex.php%2F2018%2F09%2F06%2Fbirbirine-bagli-listeledr%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fexcelileharikalar.com%2Findex.php%2F2018%2F09%2F06%2Fbirbirine-bagli-listeledr%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebest%20regards%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-879937%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-879937%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F415284%22%20target%3D%22_blank%22%3E%40H1D3F%3C%2FA%3E%26nbsp%3Bif%20anyone%20was%20curious%2C%20this%20is%20the%20formula%20I%20used%20in%20data%20validation%20to%20get%20all%20the%20blank%20spaces%20in%20my%20drop%20down%20list%20gone%20except%20for%20one.%20%3DOFFSET(Sheet1!%24A%242%3A%24EO%2463%2C0%2CMATCH(%24A%245%2CSheet1!%24A%241%3A%24EO%241%2C0)-1%2CCOUNTA(OFFSET(Sheet1!%24A%241%2C0%2CMATCH(%24A%245%2CSheet1!%24A%241%3A%24EO%241%2C0)-1%2C65%2C1))%2C1)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-893562%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-893562%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F415284%22%20target%3D%22_blank%22%3E%40H1D3F%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eif%20you%20used%20the%20formula%20I%20have%20provided%20in%20sample%20file%20please%20mark%20the%20answer%20as%20best%20solutuion...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-894797%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-894797%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F415284%22%20target%3D%22_blank%22%3E%40H1D3F%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20attached%20file%2C%20the%20formula%20for%20CountedPortfolios%20is%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DINDEX(Portfolios%2C1%2C%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EMATCH(!A2%2CManagers%2C0))%3AINDEX(Portfolios%2C%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EPortfolioCount%2CMATCH(!A2%2CManagers%2C0))%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3ENote%20that%20all%20formulas%20are%20dynamic.%3C%2FP%3E%3C%2FLINGO-BODY%3E
H1D3F
New Contributor

Hello,

I am trying to remove the blank selections from a dependent drop list I have created in Excel and I am having a hard time figuring out what the formula would be to get this accomplished. A little background, I have a table with two columns in the first column I have a drop down list feeding off of another sheet to get the manager names, formula is =Sheet1!$A$1:$EO$1. Then in second column I have a dependent drop down list that will populate specific portfolios based off the manager I had selected in the first column, formula is =INDEX(Sheet1!$A$2:$EO$67,,MATCH($A$5,Sheet1!$A$1:$EO$1,0)). The problem I am having is that most of the managers only have about 5 portfolios but one of those has about 65 portfolios, so when I select one of the smaller ones I have a bunch of blank spaces in my drop down list. Any help on how to get this resolved would be welcomed.

5 Replies

Hello @H1D3F,

 

if the different managers have varying numbers of portfolios, then you need a distinct range for each manager that includes only the rows of data for that manager.  In the attached spreadsheet you find three managers with three different range names. They have been created by selecting the manager name and the cells with text below it, then using Insert > Name > Create with the default to use the text in the top row for the range name. Any space in the range name will be replaced with an underscore. 

 

The range name for portfolio uses the formula 

 

=INDIRECT(SUBSTITUTE(Sheet1!$A3," ","_"))

 

It replaces the space in column A with an underscore and then uses that string to refer to the range name.

 

 

@H1D3F 

hello,

 

Please check the attached file. you can find the explanation of the formula in below wep page, in the second tab. It is in Turkish however you can use web translator. (BAĞ_DEĞ_DOLU_SAY is COUNTA).

 

http://excelileharikalar.com/index.php/2018/09/06/birbirine-bagli-listeledr/

 

best regards,

@H1D3F if anyone was curious, this is the formula I used in data validation to get all the blank spaces in my drop down list gone except for one. =OFFSET(Sheet1!$A$2:$EO$63,0,MATCH($A$5,Sheet1!$A$1:$EO$1,0)-1,COUNTA(OFFSET(Sheet1!$A$1,0,MATCH($A$5,Sheet1!$A$1:$EO$1,0)-1,65,1)),1)

@H1D3F 

if you used the formula I have provided in sample file please mark the answer as best solutuion...

@H1D3F 

In the attached file, the formula for CountedPortfolios is: 

=INDEX(Portfolios,1,

MATCH(!A2,Managers,0)):INDEX(Portfolios,

PortfolioCount,MATCH(!A2,Managers,0))

Note that all formulas are dynamic.

Related Conversations
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
PacketMon Components are not loading in WAC 1909
HotCakeX in Windows Admin Center on
2 Replies