Hallo zusammen,
ich habe folgendes Problem.
Ich habe zwei Excel Dateien A und B.
Sei A = Masterfile und B = Excel File, die jeden Tag geupdatet wird
A und B haben die selbe Tabelle, von Spalte ID bis hin zu Erstellungsdatum.
Ich möchte nun in A ein VBA Code schreiben, welcher bei Ausführung in B, in die Spalte ID geht, nacheinander schaut, ob die aktuelle ID in A enthalten ist, falls ja tue nichts, falls nein, kopiere die gesamte Zeile von B und füge sie in A ein.
Das heißt dass alle IDs die nicht in A enthalten sind (per Definition also neue IDs) aus B in A geschrieben werden sollen.
Ist wohl kein Hexenwerk, mit einer Schleife und einem IF lösbar, denke ich. Aber wie schaue ich denn ob die ID aus B bereits in A enthalten ist? Etwa mit der .Find Methode?
Besten Dank an alle
ich habe folgendes Problem.
Ich habe zwei Excel Dateien A und B.
Sei A = Masterfile und B = Excel File, die jeden Tag geupdatet wird
A und B haben die selbe Tabelle, von Spalte ID bis hin zu Erstellungsdatum.
Ich möchte nun in A ein VBA Code schreiben, welcher bei Ausführung in B, in die Spalte ID geht, nacheinander schaut, ob die aktuelle ID in A enthalten ist, falls ja tue nichts, falls nein, kopiere die gesamte Zeile von B und füge sie in A ein.
Das heißt dass alle IDs die nicht in A enthalten sind (per Definition also neue IDs) aus B in A geschrieben werden sollen.
Ist wohl kein Hexenwerk, mit einer Schleife und einem IF lösbar, denke ich. Aber wie schaue ich denn ob die ID aus B bereits in A enthalten ist? Etwa mit der .Find Methode?
Besten Dank an alle