Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HOW CAN i DEVELOP A FORMULA THAT RESTRICY SYMBOLS CHARACTERS TO B | Excel Worksheet Functions | |||
All keyboard characters and symbols shold be added in Autoshapes | Excel Discussion (Misc queries) | |||
In Drawing toolbar, All Characters and Symbols of the keybord sho. | Excel Programming | |||
symbols and characters in excel | New Users to Excel | |||
Sort order for characters & symbols - does anything follow z? | Excel Discussion (Misc queries) |