SOLVED

Excel Wenn(Und -> Status aktualisieren

Copper Contributor

Hallo liebe Community,

 

Ich wollte mir die Arbeit mit Excel etwas erleichtern, aufgrund meiner fehlenden Kenntnisse bin ich jedoch nicht in der Lage es selber zu machen.

 

Kurz zu dem Ablauf. Es handelt sich um eine Datei, in der einen Liste werden einzelne Verträge eingetragen und in der anderen, die tatsächlichen Werke die unter diesen Vertrag fallen (unten die Bilder). All das wird bis jetzt manuell eingetragen. Dazu habe ich ein Beispiel erstellt, die eigentliche Tabelle beinhaltet über 1000 Zeilen, die jeden Tag ergänzt werden.

Es würde mir sehr helfen, wenn Excel mir wenigstens eine Aufgabe abnehmen könnte und automatisch erkennt, wenn ein Vertrag unterzeichnet (Status "fertig") ist. Sobald ich also den Status in der "Vertragstabelle" auf "fertig" verändere, soll er bei allen Zeilen, die in der "Werktabelle" unter diesen Vertrag fallen in der Spalte "Unterzeichnet" ein "x" setzen.

 

Meine Idee war es hier die WENN(UND Funktion zu benutzen. Die Voraussetzungen waren, wenn der Vertragsname in beiden Tabellen übereinstimmt, der Vertrag am selben Datum erstellt wurde und der Status in Tabelle2 auf "fertig" ist, dann soll ein "x" gesetzt werden.

 

Hier die Funktion: =WENN(UND(C2=Tabelle2!A:A;Tabelle1!D2=Tabelle2!B:B;Tabelle2!D:D="fertig");"x";"--"). Das gewünschte Ergebnis habe ich jedoch nicht erhalten. Ich denke, Excel prüft, ob alle Zeilen in Spalte B Tabelle2 mit dem einen Namen aus Tabelle1 übereinstimmt, daher bekomme ich nicht das gewünschte Ergebnis. Bei diesem Beispiel müsste ein "x" bei allen Werken von "Mike J." und "John" gesetzt werden.

Was müsste ich verändern, damit Excel das "x" entsprechend macht, oder gibt es hier vielleicht eine andere Lösung?

Tabelle1.PNG

Tabelle2.PNG

Danke für die Hilfe.

Liebe Grüße

O. 

7 Replies

@Oskar_P_J A single cell is never equal to an entire column, so you IF will always return the if_false value of "--"

 

You probably need a formula with the structure demonstrated in the picture below:

Riny_van_Eekelen_0-1648555633797.png

 

Note that it will only pick-up the first matching value though. If you are using MS365 or Excel 2021 there may be others ways.

 

@Riny_van_Eekelen Thank you for your help.

Unfortunately, I am a beginner in Excel. How can I apply your formula to my example? I get a bit confused with your example. Do I have to combine the two formulas? or is my formula completely wrong? Is there a way that Excel automatically searches for these 3 criteria in the respective columns and sets an "x" if all three are met?

By the way, I'm using MS365 so maybe there's a simpler solution? 

Thank you 

O. 

@Oskar_P_J Perhaps you can share the file.

best response confirmed by Oskar_P_J (Copper Contributor)
Solution

@Oskar_P_J 

=IF(NOT(ISNA(VLOOKUP(Tabelle1!C2&Tabelle1!D2&"fertig",Tabelle2!A:A&Tabelle2!B:B&Tabelle2!D:D,1,FALSE))),"x","--")
=IF(NOT(ISNA(MATCH(Tabelle1!C2&Tabelle1!D2&"fertig",Tabelle2!A:A&Tabelle2!B:B&Tabelle2!D:D,0))),"x","--")

It seems to work with VLOOKUP or MATCH. Enter the formulas with ctrl+shift+enter if you don't work with Office365 or 2021.

@OliverScheurich Thank you! I Think that should work.

@OliverScheurich after applying the formula to my actual file, I noticed that excel has slowed down significantly. I'm sure it's because there are over 10,000 rows in one table and over 3,000 in the other, so quite a lot of data.
Is there any way to make the formula stop automatically once all criteria match once? Or maybe there is another way to speed up Excel despite the formula?

@Oskar_P_J 

=IF(NOT(ISNA(MATCH(Tabelle1!C2&Tabelle1!D2&"fertig",Tabelle2!$A$2:$A$10000&Tabelle2!$B$2:$B$10000&Tabelle2!$D$2:$D$10000,0))),"x","--")

This formula works quickly in my sheet. I adjusted the search matrix to the actual size of the spreadsheet.

 

The difference is that the search matrix in this formula is from row 2 to 10000:  Tabelle2!$A$2:$A$10000&Tabelle2!$B$2:$B$10000&Tabelle2!$D$2:$D$10000  .

 

In the other formula the search matrix is from row 1 to row 1048576:

Tabelle2!A:A&Tabelle2!B:B&Tabelle2!D:D .

 

 

 

   

1 best response

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

@Oskar_P_J 

=IF(NOT(ISNA(VLOOKUP(Tabelle1!C2&Tabelle1!D2&"fertig",Tabelle2!A:A&Tabelle2!B:B&Tabelle2!D:D,1,FALSE))),"x","--")
=IF(NOT(ISNA(MATCH(Tabelle1!C2&Tabelle1!D2&"fertig",Tabelle2!A:A&Tabelle2!B:B&Tabelle2!D:D,0))),"x","--")

It seems to work with VLOOKUP or MATCH. Enter the formulas with ctrl+shift+enter if you don't work with Office365 or 2021.

View solution in original post