Verknüpfte Tabellen sortieren ohne dass sich die Zellbezüge ändern.

Copper Contributor

Excel: 

Microsoft® Excel® 2016 MSO (Version 2109 ;  16.0.14430.20224) 64 Bit

Frage: Beim Sortieren einer verknüpften Tabelle in der selben Datei ändern sich die Zellbezüge.

Wie kann das verhindert werden?

Beispiel: Im Tabellenblatt 1 ist ein Verbraucher einem Planquadrat  zugeordnet.

In einem anderen Arbeitsblatt ist eine Verknüpfung auf die Zelle des Verbrauchers sowie des Planquadrates. Wird die zweite Tabelle sortiert, so erscheint nicht mehr der Original-Zellwert sondern der Wert eines anderen Verbrauchers. Siehe Beispieldatei.

Danke schon mal für einen Tipp.

 

3 Replies

@Rainer2202 Hi. Sorting the data will move it to a cell matching the for the moment chosen order.

Thus, if you refer to an absolute cell address it will, as is the problem, contain different data from sort to sort.

If you instead "look up" the corresponding value, the solution will not depend on the explicit cell address.

 

B2 =VLOOKUP($A2,$D$12:$F$21,2;0)

Vertically, LOOKUP a2 in range d12:f21, return column no 2 in that range. 0 = no fuzziness, only exactly correct matches

bosinander_1-1634193744598.png

 

Hallo Bosiander,
herzlichen Dank für die Antwort. Ja das hat mich weitergebracht.
Ein Thema bleibt aber weiterhin und macht das Ganze etwas unflexibel: Der Suchbegriff "Sicherungszuordnung" in der Ersten und der Zweiten Tabelle müssen die gleiche Zeichenfolge (Schreibweise) haben. Das wäre normalerweise über eine Verknüpfung sinnvoll, damit der Begriff in der Ersten und der Zweiten Tabelle immer identisch sind. Beim Sortieren der Tabellen werden jedoch die Verknüpfungszuordnungen geändert. Deshalb muss in den beiden Tabellen der Begriff jeweils einzeln eingepflegt werden.
Gruß
Rainer

@Rainer2202 If you have Excel 365 or later, you can use the function SORT().

eg cell A2

=SORT(D13:F21)

bosinander_0-1636350418818.png

 

If using Excel "pre dynamic arrays", ie versions released before 2021 they are missing the function sort but stillhave the command Sort on the menu Data.

Copy D13:D21, paste at A2 and when still selected,

Data: Sort

bosinander_2-1636350723957.png

The menu is how it looks in 365 and it will look different depending on version.

 

> However, one topic remains and makes the whole thing somewhat inflexible: The search term "backup assignment" in the first and second tables must have the same string (notation).

 

> This would normally be useful via a link, so that the term in the first and second tables are always identical. However, when the tables are sorted, the join mappings are changed. Therefore, the term must be entered individually in the two tables. Greeting Rainer