h20polo137
New Member
- Joined
- Jul 18, 2013
- Messages
- 13
I had program that worked well and utilized the select case method. However, from my understanding, the select case will only work with a finite number of choices.
My problem:
Initially, the program gathered log returns based on currencies from a csv file. The program supported 10 currencies, and the select case method was used in order to locate the specific currency, then gather log returns, fx rates, and some other data from this csv file. Each currency has its own 2 worksheets, one with log return data, and another with percentage return data, which is calculated from the 1st worksheet using log return data/fx rates.
However, now i need the program to be flexible based on whatever currencies are supported in the csv file. The updated input file has 12currencies instead of the fixed 10 that the program was written for. I have a summary page in the workbook that has each currency and its corresponding curve used to search for the appropriate returns/fx/etc. I was hoping i could somehow use this list in conjunction with select case method:
for example if i have 12 currencies, the select case doesnt go thru the initial 10, but 12 based on the list.
More than some exact code, im looking for some way to utilize something like the select case method to apply it to a changing number of currencies. Does anybody have any insight as to another method, or if i can still make the select case method work somehow?
Thank you in advance!
Dylan
My problem:
Initially, the program gathered log returns based on currencies from a csv file. The program supported 10 currencies, and the select case method was used in order to locate the specific currency, then gather log returns, fx rates, and some other data from this csv file. Each currency has its own 2 worksheets, one with log return data, and another with percentage return data, which is calculated from the 1st worksheet using log return data/fx rates.
However, now i need the program to be flexible based on whatever currencies are supported in the csv file. The updated input file has 12currencies instead of the fixed 10 that the program was written for. I have a summary page in the workbook that has each currency and its corresponding curve used to search for the appropriate returns/fx/etc. I was hoping i could somehow use this list in conjunction with select case method:
for example if i have 12 currencies, the select case doesnt go thru the initial 10, but 12 based on the list.
More than some exact code, im looking for some way to utilize something like the select case method to apply it to a changing number of currencies. Does anybody have any insight as to another method, or if i can still make the select case method work somehow?
Thank you in advance!
Dylan