Adding Dynamic Comments based on the Target Cell Content..using a MACRO..
Dear Forum,
I have partially achieved getting comments based on the value in the Target cell however this value is like a Unique No and needs to fetch data from different sheets however using the VLOOKUP function I have able to get this value and store it in a variable but passing it to a comment text for different target content is posing a problem..
For Representation , I have a File with three Sheets :
I - which contains the data concerning with Insurance and thus the name "I" short form for Insurance and
M - which contains the data concerning the Mutual Fund Investments and thus "M" the name for Mutual Funds
TRY - this is the sheet I wand to get the comments in the column B starting from Row = 2 till specified..
Now right now, what I am doing is that I have a Command Button in the TRY sheet which puts the Insurance and Mutual Fund Nos in the Column B from Row-2 till 16 randomly..
What I need is that based on the values in the cells B2 till B16 I need to get the details displayed in the comments for the same values as these values act as the unique Ids for the VLOOKUP function..
Now for a single value im able to do this but for a mixture between the Insurance and the Mutual Funds im facing difficulty..
Please find the code for the Command Button..
Now this Sheet is actually just a representation, however in my actual Sheet this data would be Auto -Generated in the column b..
I am not able to go beyond the Error 91..
I would also prefer to use a Select Case Statement if possible if thats more apt..
Thanks in advance..
Warm Regards
e4excel
Bookmarks