obtain cell comments from another cell

ying

New Member
Joined
Oct 21, 2010
Messages
10
What I have now is a function that returns a value to the cell. I would like to add a comment from another cell in the workbook based on the value of the current cell. Is this possible to do? Is there something like an .AddComment sort of thing to use in the function?

Thanks!

Best, Ying
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Do you perhaps mean for something like:

Code:
Function GetInfo(rngT As Range)
    GetInfo = rngT.Value
    With Application.Caller
        On Error Resume Next
        .Comment.Delete
        .AddComment rngT.Comment.Text
        On Error GoTo 0
    End With
End Function

called from a cell along the lines of:

Code:
=GETINFO(A1)

and the above cell would then populate based on A1's value with comment (if exists)
 
Upvote 0
Dear Mr. DonkeyOte, Thanks for your suggestions! Let me give it a try. I am not very skilled at this. So please bear with me.

Best, Ying
 
Upvote 0
Dear Mr. DonkeyOte, is it also possible to populate the cell with value including comment and formatting?

Thanks so much for your help!

Best, Ying
 
Upvote 0
Dear Mr. DonkeyOte, say I have a number in my cell which is 12, now I want to populate this cell with the value in cell B12, including comment and formatting. How can I do this?

Thanks a million!

Best, Ying
 
Upvote 0
I see not with formatting. :( But yes, I am happy that I can copy the comment at all. Is there some other way to copy a block of cells including comments and formatting without doing it manually? Is there a sub routine or something that can perform this?

Thanks again!

Best, Ying
 
Upvote 0
You would need to use a Change Event (or equivalent - ie a general Sub Routine which is invoked re: constant as opposed to an in-cell Function)

IMO this is in effect a new question and to that end I'd ask you start a new thread as I'm afraid I don't have the time to work on the above.
A new thread will increase your chances of getting new input.
 
Upvote 0
Let me clarify. When I have an integer number, now I want to get the value from another cell based on the integer number in this cell. E.g. an integer number 12, based on that, I want to get value from cell B12. I hope I am clear.

Thanks!

Best, ying
 
Upvote 0

Forum statistics

Threads
1,215,767
Messages
6,126,777
Members
449,336
Latest member
p17tootie

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