[Solved] How to make validity list affect next cell list?

Discuss the spreadsheet application
Post Reply
lortel
Posts: 1
Joined: Sat Apr 30, 2011 4:04 am

[Solved] How to make validity list affect next cell list?

Post by lortel »

I am making a excel spread sheet for car parts estimate list. In it, I have year, make, model, and so on. In the make cell, I have a validity list of all the makes. If I select for example GM, I want to some how filter only those models in the next cell, in this case, the Model" cell to only show models made by GM and no other companies models.

Thanks a bunch!
Last edited by Hagar Delest on Mon Dec 19, 2011 9:16 am, edited 1 time in total.
Reason: tagged [Solved].
open office 3.1 on xp pro
ken johnson
Volunteer
Posts: 918
Joined: Sun May 31, 2009 1:35 am
Location: Sydney, Australia

Re: How to make validity list affect next cell list?

Post by ken johnson »

Here's one way using named ranges...
Dependent Selection Lists.ods
(10.61 KiB) Downloaded 3027 times
Ken Johnson
AOO 4.1.3 on Ms Windows 10
Help improve this forum by clicking the EDIT button on your first post then adding "[Solved]" to its heading once a solution to your problem has been provided.
User avatar
MrProgrammer
Moderator
Posts: 4909
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: How to make validity list affect next cell list?

Post by MrProgrammer »

Hi, and welcome to the forum.

Here's another way using IF statements:

If this answered your question please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Attachments
201104292303.ods
(8.58 KiB) Downloaded 2317 times
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
gerard24
Volunteer
Posts: 958
Joined: Sat Oct 30, 2010 5:12 pm
Location: France

Re: [Solved] How to make validity list affect next cell list

Post by gerard24 »

Formula in source of validity is considered as array formula when reference is an array without entering as {array formula} (like Named formula).

So you can use IF statement directly in Data > Validity.
Source of the 2nd list =IF(Selections.A2:A11=A2;Selections.B2:B11;"")

Value FALSE is considered as blank cell in this case, you can reduced the formula like this :

Code: Select all

=IF(Selections.A2:A11=A2;Selections.B2:B11)
The source of the 3rd list is :

Code: Select all

=IF((Selections.A2:A11=A2)*(Selections.B2:B11=B2);Selections.C2:C11)
spate_list.ods
(9.52 KiB) Downloaded 1711 times
LibreOffice 6.4.5 on Windows 10
User avatar
keme
Volunteer
Posts: 3705
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: [Solved] How to make validity list affect next cell list

Post by keme »

gerard24 wrote:Formula in source of validity is considered as array formula when reference is an array without entering as {array formula} (like Named formula).

So you can use IF statement directly in Data > Validity. ...
Thanks, Gerard24! I learned something new today.

The possibility to dynamically generate arrays should solve the OP's problem.
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
Post Reply