Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It could have something to do with pasting this into an email, but the
character you show is char 191, which doesn't require unicode. Not sure what you mean by Language equivalent. Regards, Tom Ogilvy "Kevin Lyons" wrote in message ... Hello, I am trying to code a macro that will replace or substitute all "¿" unicode characters to their language equivalent using Application.Substitute and/or StrConv. I have written the below macro, but I am having trouble getting it to do as I expect. My thinking is to use the StrConv within the Application.Substitute code... The counter code that is commented works but for only a specific cell. What I would like is the entire workbook changed accordingly. Can someone assist? -------------------------- Sub fixUnicode() ' counter = Range("A1046").Value ' strTest = StrConv(counter, vbFromUnicode) ' MsgBox "strTest = " & strTest ' Range("B1046").Value = strTest For Each unicodeChar In ActiveSheet.UsedRange.Columns("A:AK").Cells Range(unicodeChar.Address) = Application.Substitute(unicodeChar.Value, "¿", StrConv("¿", vbFromUnicode)) unicodeChar.WrapText = True 'okfilename = Application.WorksheetFunction.Substitute(variousar tistsfilename, "-OK", "") 'newfilename = StrConv(okfilename, vbProperCase) Next ' For Each periodSlash In ActiveSheet.UsedRange.Columns("AG:AK").Cells ' Range(periodSlash.Address) = Application.Substitute(periodSlash.Value, _ ' "./", "." & Chr(10)) ' periodSlash.WrapText = True ' Next ' Selection.Replace What:="¿", Replacement:="?", LookAt:= _ ' xlPart, SearchOrder:=xlByRows, MatchCase:=False End Sub -------------------------- Thanks, Kevin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
I mean an upside down ? is what is showing in my Excel file. When I run the top portion of the code on it, I get the associated Chinese or Japanese characters. Assuming that it is unicode, do you have a solution? Kevin Tom Ogilvy wrote: It could have something to do with pasting this into an email, but the character you show is char 191, which doesn't require unicode. Not sure what you mean by Language equivalent. Regards, Tom Ogilvy "Kevin Lyons" wrote in message ... Hello, I am trying to code a macro that will replace or substitute all "¿" unicode characters to their language equivalent using Application.Substitute and/or StrConv. I have written the below macro, but I am having trouble getting it to do as I expect. My thinking is to use the StrConv within the Application.Substitute code... The counter code that is commented works but for only a specific cell. What I would like is the entire workbook changed accordingly. Can someone assist? -------------------------- Sub fixUnicode() ' counter = Range("A1046").Value ' strTest = StrConv(counter, vbFromUnicode) ' MsgBox "strTest = " & strTest ' Range("B1046").Value = strTest For Each unicodeChar In ActiveSheet.UsedRange.Columns("A:AK").Cells Range(unicodeChar.Address) = Application.Substitute(unicodeChar.Value, "¿", StrConv("¿", vbFromUnicode)) unicodeChar.WrapText = True 'okfilename = Application.WorksheetFunction.Substitute(variousar tistsfilename, "-OK", "") 'newfilename = StrConv(okfilename, vbProperCase) Next ' For Each periodSlash In ActiveSheet.UsedRange.Columns("AG:AK").Cells ' Range(periodSlash.Address) = Application.Substitute(periodSlash.Value, _ ' "./", "." & Chr(10)) ' periodSlash.WrapText = True ' Next ' Selection.Replace What:="¿", Replacement:="?", LookAt:= _ ' xlPart, SearchOrder:=xlByRows, MatchCase:=False End Sub -------------------------- Thanks, Kevin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sub routine | Excel Discussion (Misc queries) | |||
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE.... max. limit 8 :( | Excel Discussion (Misc queries) | |||
Sort Routine | Excel Discussion (Misc queries) | |||
simplifying routine | New Users to Excel | |||
How to create a routine | Excel Discussion (Misc queries) |