Gå til innhold

Anbefalte innlegg

Jeg lurte på om noen vet hvordan eller om man kan lage en slags juletrestruktur i Excel:

 

Man velger en verdi, A eller B vha listefunkjsonen.

Velger man A, skal liste1 vises i cellen, velger man B, skal liste2 vises.

Begge listene skal ha mange verdier i seg.

Liste1 og liste2 blir definert på et annet ark.

 

Jeg vet hvordan man lager lister, og kan litt VB.

 

Tenkte på noe sånt:

=IF(D4=A;liste1;liste2)

 

Evt

 

=IF(D4=A;liste1;IF(D4=B;liste2;feil))

 

Problemet ser ut til å være at jeg ikke kan navngi de to listene og få dem vist i cellen avhengig av hva som står i D4

 

All hjelp mottas med takk!

Lenke til kommentar
Videoannonse
Annonse

Var nok ikke så gærnt, fikk svar hos Mr.Excel.com :)

 

"Data validated lists more than 1

have two lists of which the 2nd depends on the selection from the 1st.

 

The method is as follows:

 

Enter in some column what follows:

 

{"USA";"FRANCE"}[ That's, enter USA in a cell, then FRANCE in the next cell down ]

 

Select these cells, go to the Name Box on the Formula Bar, and type COUNTRIES followed by enter.

 

Enter in a column next to COUNTRIES:

 

{"New York";"Pittsburgh";"Los Angeles";"Boston"}

 

Name this range of cells USA via the Name Box as described above.

 

Enter in a column next to USA:

 

{"Paris";"Nice";"Toulon"}

 

Name this range FRANCE.

 

Just to see how this works,

 

activate A1 in some worksheet in the same workbook;

 

activate Data|Validation;

 

choose 'List' for 'Allow';

 

enter as 'Source' the formula:

 

=COUNTRIES

 

click OK;

 

activate another cell in the same worksheet, say, C1;

 

activate Data|Validation;

 

choose 'List' for 'Allow';

 

enter as 'Source' the formula:

 

=INDIRECT(A1)

 

click OK.

 

Now you have two lists of which the 2nd depends on the selection from the 1st."

Lenke til kommentar

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
×
×
  • Opprett ny...