Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Richcarvel
 
Posts: n/a
Default Find and Replace in the Comment Field

I know how to find a string in a comment field, but I can't seem to find a
way to do a Find and Replace inside a comment field. Does anyone know how?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
Posts: n/a
Default Find and Replace in the Comment Field

Try

Dim CMT As Comment
Set CMT = Range("A1").Comment
CMT.Text Text:=Replace(CMT.Text, "test", "another test")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Richcarvel" wrote in
message
...
I know how to find a string in a comment field, but I can't seem
to find a
way to do a Find and Replace inside a comment field. Does
anyone know how?



  #3   Report Post  
Posted to microsoft.public.excel.misc
Richcarvel
 
Posts: n/a
Default Find and Replace in the Comment Field

Thanks, Chip. Forgive my ignorance of VB. That code replaced one instance
of the text in the spreadsheet, how do I get them all? Thanks. Rich

"Chip Pearson" wrote:

Try

Dim CMT As Comment
Set CMT = Range("A1").Comment
CMT.Text Text:=Replace(CMT.Text, "test", "another test")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Richcarvel" wrote in
message
...
I know how to find a string in a comment field, but I can't seem
to find a
way to do a Find and Replace inside a comment field. Does
anyone know how?




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
Find and Replace blakrapter Excel Worksheet Functions 3 December 15th 05 12:25 AM
find and replace, within workbook Matt Carter Excel Discussion (Misc queries) 1 November 22nd 05 12:55 AM
Find and replace of word causes change of font formatting jwa90010 New Users to Excel 4 July 22nd 05 08:10 PM
Find and Replace - Quickest Option? Lindsey M Excel Worksheet Functions 1 March 8th 05 11:34 AM
VB Find and Replace Bony_Pony Excel Worksheet Functions 10 December 6th 04 05:45 PM


All times are GMT +1. The time now is 07: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"