Chance1234
IS-IT--Management
I have two arrays which look like the following;
arrSplit1
arrSplit2
both are identical , have two dimensions and look like the following
I am at this moment in time only interested in a handful of currencys which are
AUD, EUR, NZD, USD
and from this information, i wish to create FX pairs in the following format.
Which is all working ok, to acheive this im using the following code
However, the problem I have , is im getting for example
AUD/EUR [AUD]
&
EUR/AUD [EUR]
When i only need one pair for each combination. Is there a way i can dynamically change my select case on each currency iteration ?
Chance,
F, G and Skipper
arrSplit1
arrSplit2
both are identical , have two dimensions and look like the following
Code:
AUD,0.4237
BMD,1.6613
BRL,0.4481
BGN,2.4389
CAD,0.9845
CNY,1.116
COP,835.1
DKK,0.415
EGP,9.0769
EUR,0.2666
..
etc
I am at this moment in time only interested in a handful of currencys which are
AUD, EUR, NZD, USD
and from this information, i wish to create FX pairs in the following format.
Code:
AUD/EUR [AUD] AUD/NZD [AUD] etc... AUD/USD [AUD]
Closing Closing Closing
2008/11/06 1.897675 0.881525 1.471839
Which is all working ok, to acheive this im using the following code
Code:
...
For i = 0 To intArrCnt - 1
Select Case arrSplit1(0, i)
Case "AUD", "EUR", "NZD", "USD"
For y = intFirstR To intArrCnt - 1
Select Case arrSplit2(0, y)
Case "AUD", "EUR", "NZD", "USD"
If arrSplit1(0, i) <> arrSplit2(0, y) Then
strLine1 = strLine1 & vbTab & arrSplit1(0, i) & "/" & arrSplit2(0, y) & " [" & arrSplit1(0, i) & "]"
strLine2 = strLine2 & vbTab & "Closing"
strLine3 = strLine3 & vbTab & Math.Round(arrSplit1(1, i) / arrSplit1(1, y), 6)
End If
End Select
Next
End Select
Next
...
However, the problem I have , is im getting for example
AUD/EUR [AUD]
&
EUR/AUD [EUR]
When i only need one pair for each combination. Is there a way i can dynamically change my select case on each currency iteration ?
Chance,
F, G and Skipper