18.10.2021, 13:25
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
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