Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Converting cell content into comment

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Converting cell content into comment

http://www.cpearson.com/Excel/newposte.htm

Please read #21

If you multipost your question, pertinent details become fragmented across
multiple threads. Also, you will waste someones time trying to answer a
question that may have already been answered in another thread (which is why
a number of folks don't respond to multiposted questions).



"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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Converting cell content into comment

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting cell content into comment Akash Maheshwari Excel Discussion (Misc queries) 0 September 4th 07 06:30 AM
copy comment content to cell content as data not as comment Lilach Excel Discussion (Misc queries) 2 June 21st 07 12:28 PM
Can Comment in a cell be changed as the content in another cell ?? Amit Kumar Baidyaka Excel Discussion (Misc queries) 3 January 10th 07 03:35 AM
Converting a cell into a comment pasbillhen Excel Discussion (Misc queries) 1 November 17th 06 05:50 PM
How do I copy the cell-content plus its comment to another cell ? Matthias Excel Worksheet Functions 2 March 14th 06 05:41 PM


All times are GMT +1. The time now is 08:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"