Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Lonely" ha scritto nel messaggio
... | Hi All, | I need to replace the text "NS" from all the cells in all the | worksheets of an Excel workbook. I wish to design a macro that can help | me do this along with the use of something that would allow me to do | the "Find Whole Word" option similatr to the one we have in MS Word. see also newsgroup: this thread: most popular word date of thread: dec 8, 2003 date of post: today Sub nsWord() Dim w As Worksheet, c As Range Set regexp = CreateObject("VBScript.RegExp") regexp.Global = True regexp.IgnoreCase = True regexp.Pattern = "\bns\b" For Each w In ActiveWorkbook.Worksheets Set rng = w.UsedRange For Each c In rng c = regexp.Replace(c.Text, "") Next Next End Sub .f fernando cinquegrani Microsoft MVP http://www.prodomosua.it |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to find a particular word? | Excel Worksheet Functions | |||
How to find the first Word in a range ? | Excel Discussion (Misc queries) | |||
where do i find word document | New Users to Excel | |||
Find last word in a string | Excel Discussion (Misc queries) | |||
Find a word and then take certain action, else | Excel Worksheet Functions |