Sir, Good evening from England, Sorry for the bother yet again, May i request your help in modifying your code that brilliantly uses the multi dim temp array/*my comment- that was a class act of yours*/ or even the formats approach to work for a slightly altered requirement:- 1. The Dataset1 has another variable by the name Market_type, that has 3 kinds of values namely "Retail", "Wholesale" and "SME". What it means is that the ID, being a business entity belongs to one of the 3 market types. 2. Dataset 2, being the rating look up Data set remains the same, however there is one separate "Rating look up table" for Retail, and one for wholesale and likewise one for SME. So In essence there are 3 different rating look up data sets. 3. Now the point is that, the look up needs to be done from Dataset 1 <---> Retail look up dataset for id's that are retail in market_type exclusively. And similarly from Dataset1 <---> Wholesale look up table for id's that are wholesale and Dataset1<--->SME look up table. /*Sounds like a filter to be applied in dataset1 for my novice level of understanding*/ 4. The logic to get the R% remains same, expect "when there are 3 ratings for an ID, I need to pick R% for ID's using the middle of the 3 lkup_ratings instead of the lowest as you did before otherwise for remaining occurances such as 1 or 2 ratings the same lowest lkup ratings applies as before." 5. If there are no ratings for an ID with blank values, that means the ID falls into the category of Unrated, which will have to pick the default R% from respective Ratings datasets from the unrated observation. /*The weird thing here is that in some rating look up table, the unrated observation is represented as blank unlike what you see in the last row in Dataset2 where it is clearly mentioned*/ 1 UR Unrated Unrated Unrated I fear whether I have explained well enough to make it easy enough to understand. If not, please let me know if I can explain better. I'd sincerely appreciate your help. Many thanks as always! With Pleasant Regards, Charlotte
... View more