Clever-Excel-Forum

Normale Version: Wie merged man zwei arrays mit Filterbedingung?
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Hallo community!

Derzeit belege ich einen VBA Kurs und habe von unserem Prof folgende nachstehende Aufgabe erhalten, die keiner im Kurs lösen kann. Daher wende ich mich an euch im Forum, vielleicht habt ihr ja eine zündende Idee:



-------

We use the pseudo-code below to merge 2 datasets. Dataset 1 is already imported and will be store in the array v1(). Dataset 2 will be read and stored in the array v2().

We want to merge the 2 datasets using a key variable, assuming that all values in the key variable are unique. The data is described below.
Your task is to choose a position and insert the merge condition.

Example: (1) If cat > dog

Please respect the spacing after each symbol, and insert only the condition with no further keyword.

The pseudo-code indicates only the main steps, other necessary steps might not be shown:

[Import data to array v1]
[Declare array v2]
[Open data 2 file]
[Open Do loop]
Line = Split[Data row]
d1 = Line(0)
(1)
[Convert d1 into date]
(2)
[For loop] with index k
(3)
Next
(4)
row = row + 1
[Assign values to array v2]
(5)
[Close Do loop]
(6)

The array v1() stores the variables in the following order : dates(1), ticker(2), bid(3), ask(4), price(5), returns(6).
The dataset 2 contains variables in the following order : dates(1), ticker(2), bid(3), ask(4), price(5), returns(6).

We merge by using the key variable “ticker”



-------


Vielen Dank!

LG
Pete
Zitat:Please respect the spacing after each symbol



What symbol ?
Where symbol ?
Why not posting a sample workbook ?
office-hilfe.com/support/threads/36909#ARRAY_COMBINE (benötigt =LAMBDA() aus xl365-Insider-Beta)