Re: $$Excel-Macros$$ Extract a comment and paste in adjacent cell

2011-06-29 Thread Dilip Pandey
Hi Heather, Check the below link:- http://chandoo.org/wp/2009/09/03/get-cell-comments/ Best Regards, DILIPandey On 6/29/11, Heather galo...@comcast.net wrote: I would like to extract comments and paste it next to the cell. For example: The comment in cell A1 would be pasted in B1 The

Re: $$Excel-Macros$$ Extract a comment and paste in adjacent cell

2011-06-29 Thread NOORAIN ANSARI
Dear Heather, Please try it... Function extract_text(abc As Range) Dim i As String i = Application.WorksheetFunction.Clean(abc.Comment.Text) extract_text = VBA.Right(i, Len(i) - InStr(1, i, :)) End Function -- Thanks regards, Noorain Ansari On Wed, Jun 29, 2011 at 9:31 AM,

Re: $$Excel-Macros$$ Extract a comment and paste in adjacent cell

2011-06-29 Thread Vasant
Try this. Sub Test() Dim Rng as range Set Rng = ActiveSheet.Range(A1) Debug.Print Rng.Comment.Text End sub if you want to use it as a UDF Function GetComment(Rng as range) GetComment= Rng.Comment.Text End sub On Wed, Jun 29, 2011 at 9:31 AM, Heather galo...@comcast.net wrote: I would like to

Re: $$Excel-Macros$$ Extract a comment and paste in adjacent cell

2011-06-29 Thread ICWAI Help
*Function GetComment(c As Range) GetComment = c.Comment.Text End Function * On Wed, Jun 29, 2011 at 11:52 AM, Vasant vasant...@gmail.com wrote: Try this. Sub Test() Dim Rng as range Set Rng = ActiveSheet.Range(A1) Debug.Print Rng.Comment.Text End sub if you want to use it as a UDF

Re: $$Excel-Macros$$ Extract a comment and paste in adjacent cell

2011-06-29 Thread Heather
This worked and I now have it as an excel add-in for all my excel workbooks! Thank you so much! Heather On Jun 29, 1:22 am, Dilip Pandey dilipan...@gmail.com wrote: Hi Heather, Check the below link:- http://chandoo.org/wp/2009/09/03/get-cell-comments/ Best Regards, DILIPandey On