• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

getComment function

iason

New Member
Hello, I ve found all of your tips really interesting and actually very helpful!!!

Regarding the getComment function, sth I needed for my homework, I found out that I cannot use it combined with another function. For instance, I tried to use the function in order to bring comments from another excel sheet(same book), so I wrote the following: =getComment(ADDRESS(8;MATCH(Sheet3!G1;ΜΑΙ!E4:AI4;0);1;TRUE;"[ΜΑΙ"))

Nothing happened and I have no idea of what s going on!!!


I would be grateful if you could help me!

thank you!!!
 
Welcome to the forum!


Looks like the UDF needs to have an actual cell range passed to it. Unfortunately, the ADDRESS function just returns a text string. To get the actual cell, we could use INDIRECT, or we can use INDEX. In this case, it's a little easier to use INDEX since we are trying to determine the column.

=getComment(INDEX(MAI!A8:AE8;MATCH(Sheet3!G1;MAI!E4:AI4;0))


Chandoo's original article on this UDF for any future readers:

http://chandoo.org/wp/2009/09/03/get-cell-comments/
 
Thank you, Luke!!! Your advice was exactly what I needed!

However, another problem appeared with this function. I followed all the steps in order to insert the function in my excel workbook, but every time I close it,suddenly the function disappears, and i can not use it any more.

So, I repeat the same procedure to install the function!

I wonder if there s an other way to make the function permanent!!!

Thank you again!
 
Iason


You have to save it as either an Excel Macro file type *.xlsm or Excel Binary file type *.xlsb file type
 
You could also use the alternate method Chandoo described in his article to save the function as an add-in.
 
Thank you again for your advice!

I have done what Hui and Luke suggested, but the problem still exists. I can not reopen a file that keeps the function. So, everything works OK, until I close my workbook. I can nt understand what s going on. I m wondering guys, have you tried to reopen the workbook? If you have, please let me know what you did, so that I can Find what I am doing wrong!!!!
 
Function is stored in a public variable?

Workbook is saved with xlsm or xlsb extension?


I've saved and reopened on my own machine.
 
Back
Top