SOLVED

Can we make a dependent dropdown based on the value of other cell

Brass Contributor

I want to get a dropdown list based on the value of another cell.

I've already got a formula. However I can't manually enter the value, I've to select it via list only. Can it be sorted? 
I'm attaching the file

@Sergei Baklan @Peter Bartholomew @Detlef Lewin @Riny_van_Eekelen 

2 Replies
best response confirmed by Nishkarsh31 (Brass Contributor)
Solution

@Nishkarsh31 The solution would be not to use LET. Don't really understand why, but it seems overly complicated to begin with. Just repeat the code for the "yo" variable. Then, the formula for the data validation will look like this:

=OFFSET('Exp List'!$A$2,0,XMATCH(D6,'Exp List'!$A$1:$H$1)-1,COUNTA(OFFSET('Exp List'!$A$2,0,XMATCH(D6,'Exp List'!$A$1:$H$1)-1,100)))

or, if you would use some named ranges for the categories and starting point it could become like this:

=OFFSET(start,0,XMATCH(D6,categories)-1,COUNTA(OFFSET(start,0,XMATCH(D6,categories)-1,100)))

 Not very complex and not really necessary to use LET. and it will allow you to enter the sub-category by typing.

Thank you so much sir.
I would never have been able to guess why LET is the one that's not working in his situation
1 best response

Accepted Solutions
best response confirmed by Nishkarsh31 (Brass Contributor)
Solution

@Nishkarsh31 The solution would be not to use LET. Don't really understand why, but it seems overly complicated to begin with. Just repeat the code for the "yo" variable. Then, the formula for the data validation will look like this:

=OFFSET('Exp List'!$A$2,0,XMATCH(D6,'Exp List'!$A$1:$H$1)-1,COUNTA(OFFSET('Exp List'!$A$2,0,XMATCH(D6,'Exp List'!$A$1:$H$1)-1,100)))

or, if you would use some named ranges for the categories and starting point it could become like this:

=OFFSET(start,0,XMATCH(D6,categories)-1,COUNTA(OFFSET(start,0,XMATCH(D6,categories)-1,100)))

 Not very complex and not really necessary to use LET. and it will allow you to enter the sub-category by typing.

View solution in original post