LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default Find comment replace cell value

Something like this will do (Lightly tested)

Sub FindTextInComment()
Dim txtToFind As String
Dim cmt As Comment
Dim res As Double
txtToFind = InputBox("Enter text to find in comments")
For Each cmt In ActiveSheet.Comments
res = InStr(1, cmt.Text, txtToFind, 1)
If res 0 Then
cmt.Parent.Value = "123"
End If
Next cmt
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


wrote in message
oups.com...
Hi. I've searched through previous posts, and it seems that none is
what I am looking for. Everyone else seems to want to find cells with
specific text in the comment and replace that text within the comments.
What I need is to find all cells with specific text in the comments,
then replace the cell values. "Find all cells with "xxx" in the
comments and change all of the cell values to "123". I'd do it one by
one but there are hundreds. None of my macros seem to work. Any
ideas?

Thanks.
Kind regards,



 
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
find and replace macro strange behaviour Nicawette Excel Discussion (Misc queries) 3 June 13th 06 08:49 PM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Replace a spreadsheets named cells/ranges with exact cell address. David McRitchie Excel Discussion (Misc queries) 0 September 28th 05 08:59 PM
find replace format neeraj Excel Discussion (Misc queries) 6 September 20th 05 05:50 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


All times are GMT +1. The time now is 12:37 PM.

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

About Us

"It's about Microsoft Excel"