Select Case Alternative

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
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top