Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deal with text characters that are greater than chr(127)
I am dealing with a spreadsheet that is downloaded from another
application. The parent application allows html text and includes some bullits. When this text is downlaoded to an excel spreadhseet the bullits are converted to the followng text string: ’ The ’ is chr(128) and the is chr(162) (I may have these reversed?) but I have not been able to determine the code for the . But indepedent of not knowing the code for the one character I'm having trouble dealing with these characters. Using a manual search for just one character nothing is found. I'd like to replace this string of characters (’) with a "-" and maybe a CR/LF at the start so that the resulting text looks similar to the html. How do I deal with these unusual characters? Thanks for the suggestions! John Keith |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deal with text characters that are greater than chr(127)
not sure what characters you need, but if all you need are alphanumeric, 122
should be the highest number you need. if it's 123, then delete it. or you can test for the following values: 48 - 57 are 0-9 65 - 90 are A-Z 97-122 are a-z or look at the character map in windows to find your character. -- Gary Keramidas Excel 2003 "John Keith" wrote in message ... I am dealing with a spreadsheet that is downloaded from another application. The parent application allows html text and includes some bullits. When this text is downlaoded to an excel spreadhseet the bullits are converted to the followng text string: ?’ The ’ is chr(128) and the ? is chr(162) (I may have these reversed?) but I have not been able to determine the code for the . But indepedent of not knowing the code for the one character I'm having trouble dealing with these characters. Using a manual search for just one character nothing is found. I'd like to replace this string of characters (?’) with a "-" and maybe a CR/LF at the start so that the resulting text looks similar to the html. How do I deal with these unusual characters? Thanks for the suggestions! John Keith |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deal with text characters that are greater than chr(127)
I usually crate a sime macro for debugging these probelms InputSr = "abcdefghij" rowcount = 1 for i = 1 to len(InputStr) .cells(RowCount,i) = asc(mid(InputStr,i,1)) next i to replaced the character one you find the results use this Replace_What = chr(128) & chr(162) & chr(x) 'x is last character Replace_By = vbLf '"-" b = InStr(a, Replace_What) While b 0 a = Mid(a, 1, b - 1) & Replace_By & Mid(a, b + Len(Replace_What)) b = InStr(a, Replace_What) Wend Cells(1, 1).Formula = a -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=166507 Microsoft Office Help |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deal with text characters that are greater than chr(127)
On Sun, 3 Jan 2010 00:49:43 -0500, "Gary Keramidas"
<GKeramidasAtMSN.com wrote: or look at the character map in windows to find your character. Gary, Thank you for the suggestion to look at the character map. I now have some basic info on each character (I had to select several diffeerent fonts before I found each character): keystroke to enter: ALT + 0128 ALT + 0162 ’ ALT + 0226 This insight along with the other suggestions may solve the issue. This exercise will be another learning experience! I've not had to deal with what I would call non-standard ASCII before. John Keith |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deal with text characters that are greater than chr(127)
On Sun, 3 Jan 2010 11:44:32 +0000, joel
wrote: I usually crate a sime macro for debugging these probelms Joel, I had started with some simple cut and paste into the Find and Replace in Excel but was not successful with that. I also used a macro to simply create all ASCII characters and even that didn't get me to any useful results. Later today I'll play with your suggestion. Thanks John Keith |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deal with text characters that are greater than chr(127)
|
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deal with text characters that are greater than chr(127)
Thanks for the pointers, the problem has been solved!
The simple code line below replaces all occurences of the characters I wanted to find: Cells.Replace What:="’", Replacement:=Chr(10) & "-" The characters are entered inside the quotes by using the key sequences noted below: keystroke to enter: ALT + 0226 ALT + 0128 ALT + 0162 ’ John Keith |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deal with text characters that are greater than chr(127)
glad you got it worked out.
-- Gary Keramidas Excel 2003 "John Keith" wrote in message ... Thanks for the pointers, the problem has been solved! The simple code line below replaces all occurences of the characters I wanted to find: Cells.Replace What:="?’", Replacement:=Chr(10) & "-" The characters are entered inside the quotes by using the key sequences noted below: keystroke to enter: ALT + 0226 ALT + 0128 ? ALT + 0162 ’ John Keith |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Has anyone made a Deal or No Deal Gameboard? | Excel Programming | |||
Has anyone made a Deal or No Deal Gamebord | Excel Discussion (Misc queries) | |||
Greater than less than arguement returning value when text inputte | Excel Discussion (Misc queries) | |||
how do i display cell contents greater than 255 characters in a t. | Excel Discussion (Misc queries) | |||
Cell Content Greater than 24 Characters. | Excel Worksheet Functions |