Will from London
Board Regular
- Joined
- Oct 14, 2004
- Messages
- 220
Hi
I am attempting to write a custom function to validate the Complementary Identification Code (CIC) for a list of over 10,000 financial assets.
The CIC is a 4 character alpha-numeric code and I have an exhaustive list of permitted options for the first two characters and an exhaustive list of permitted options for the final two. There are 251 for the first and 112 for the second so I would prefer not to have to type them all into the VBA function. These two lists are stored as columns (text) within the same Excel workbook (but on a different tab) as where the formula needs to be used. I've already allowed for cases where the CIC is not exactly 4 characters and where the letters are not in uppercase.
For example in cell A1 I have "FR11" and I want cell B1 to show "OK" (as both "FR" and "11" are in the respective lists) but if I have "FR10" in cell A2 I want B2 to return "Error" (as the "10" is not permitted in the second list).
Any help will be much appreciated.
I am attempting to write a custom function to validate the Complementary Identification Code (CIC) for a list of over 10,000 financial assets.
The CIC is a 4 character alpha-numeric code and I have an exhaustive list of permitted options for the first two characters and an exhaustive list of permitted options for the final two. There are 251 for the first and 112 for the second so I would prefer not to have to type them all into the VBA function. These two lists are stored as columns (text) within the same Excel workbook (but on a different tab) as where the formula needs to be used. I've already allowed for cases where the CIC is not exactly 4 characters and where the letters are not in uppercase.
For example in cell A1 I have "FR11" and I want cell B1 to show "OK" (as both "FR" and "11" are in the respective lists) but if I have "FR10" in cell A2 I want B2 to return "Error" (as the "10" is not permitted in the second list).
Any help will be much appreciated.