Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Tue, 04 Sep 2007 05:36:21 -0000, Akash Maheshwari wrote:
Hi, I have a sheet in which Leave is mentioned many times in different cell. I want to have a macro through which i can replace the word Leave and put a Comment with Leave in the cell How can i do that. thanks in advance Akash Akash, try with this code: --- Sub DoComment() Dim R As Range, rF As Range, cFirst As String Set R = ActiveSheet.UsedRange.Find("Leave", _ LookIn:=xlValues, _ LookAt:=xlPart, _ MatchCase:=False) If Not R Is Nothing Then cFirst = R.Address Do R.AddComment "Leave in cell" Set R = ActiveSheet.UsedRange.FindNext(R) Loop Until R Is Nothing Or R.Address = cFirst End If End Sub --- HTH, B. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Converting cell content into comment | Excel Discussion (Misc queries) | |||
copy comment content to cell content as data not as comment | Excel Discussion (Misc queries) | |||
Can Comment in a cell be changed as the content in another cell ?? | Excel Discussion (Misc queries) | |||
Converting a cell into a comment | Excel Discussion (Misc queries) | |||
How do I copy the cell-content plus its comment to another cell ? | Excel Worksheet Functions |