SOLVED

Berechnung je nach Auswahl im Dropdownmenü

Copper Contributor

Hallo,

ich habe eine Liste mit zwei Spalten, in der ersten Spalte steht ein Bezeichner (also ein Wort) und in der zweiten Spalte steht eine Zahl. Jetzt möchte ich gerne ein Dropdown erstellen in sagen wir A1. Wenn ich jetzt im Dropdown beispielsweise die Zeile mit dem Bezeichner "Zeile1" auswähle, möchte ich in B1 folgende beispielhafte Rechnung ausführen: =1+der Wert der zu Zeile1 gehört. Sprich, ich möchte immer 1+ den Wert aus der zweiten Spalte der anfangs erwähnten Liste rechnen, der im Dropdown ausgewählt wurde. Wie mache ich sowas?

 

Vielen Dank für die Hilfe!

1 Reply
best response confirmed by UnknownBob (Copper Contributor)
Solution

@UnknownBob 

Let's say the list is in K2:L50.

 

Select the cells in column A in which you want a dropdown, for example A1:A10.

On the Data tab of the ribbon, click Data Validation.

Select List from the Allow dropdown.

Specify K2:K50 (the first column of your list) as Source.

Click OK.

Enter the following formula in B1:

 

=IFERROR(VLOOKUP(A1,$K$2:$L$50,2,FALSE),"")

 

=WENNFEHLER(SVERWEIS(A1;$K$2:$L$50;2;FALSCH);"")

 

Fill down to the last used row (B10 in the above example)

1 best response

Accepted Solutions
best response confirmed by UnknownBob (Copper Contributor)
Solution

@UnknownBob 

Let's say the list is in K2:L50.

 

Select the cells in column A in which you want a dropdown, for example A1:A10.

On the Data tab of the ribbon, click Data Validation.

Select List from the Allow dropdown.

Specify K2:K50 (the first column of your list) as Source.

Click OK.

Enter the following formula in B1:

 

=IFERROR(VLOOKUP(A1,$K$2:$L$50,2,FALSE),"")

 

=WENNFEHLER(SVERWEIS(A1;$K$2:$L$50;2;FALSCH);"")

 

Fill down to the last used row (B10 in the above example)

View solution in original post