Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Replace characters with symbols

I would like to write a macro which loops through all cells in a worksheet
and if it finds the characters (? replaces them with, for example the symbol
Alpha, but does not modify the rest of the text in the cell.
I woul be grateful if someone could tell me how to do this.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default Replace characters with symbols

Choose EditReplace: Find: ~? and Replace: a.
(Copy the alpha symbol from the windows character map or using the
Insert Symbol)


Michael wrote:

I would like to write a macro which loops through all cells in a worksheet
and if it finds the characters (? replaces them with, for example the symbol
Alpha, but does not modify the rest of the text in the cell.
I woul be grateful if someone could tell me how to do this.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Replace characters with symbols

Lori's response is best, but if you need to do this in VBA, then:

Sub demo()
Dim r As Range
For Each r In ActiveSheet.UsedRange
r.Value = WorksheetFunction.Substitute(r.Value, "?", ChrW(945))
r.Value = WorksheetFunction.Substitute(r.Value, "(", ChrW(945))
Next
End Sub

to replace each of your two characters separately or

Sub demo()
Dim r As Range
For Each r In ActiveSheet.UsedRange
r.Value = WorksheetFunction.Substitute(r.Value, "(?", ChrW(945))
Next
End Sub

to replace the string (?
--
Gary''s Student


"Michael" wrote:

I would like to write a macro which loops through all cells in a worksheet
and if it finds the characters (? replaces them with, for example the symbol
Alpha, but does not modify the rest of the text in the cell.
I woul be grateful if someone could tell me how to do this.

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
HOW CAN i DEVELOP A FORMULA THAT RESTRICY SYMBOLS CHARACTERS TO B Rodrjua Excel Worksheet Functions 1 April 29th 10 10:12 AM
All keyboard characters and symbols shold be added in Autoshapes Parantap Excel Discussion (Misc queries) 1 April 29th 06 08:17 PM
In Drawing toolbar, All Characters and Symbols of the keybord sho. Parantap Excel Programming 0 April 15th 06 02:18 PM
symbols and characters in excel vinnmarti New Users to Excel 3 January 23rd 06 10:18 PM
Sort order for characters & symbols - does anything follow z? Neil Goldwasser Excel Discussion (Misc queries) 4 August 5th 05 05:02 AM


All times are GMT +1. The time now is 01:05 AM.

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"