PC Review


Reply
Thread Tools Rate Thread

Deal with text characters that are greater than chr(127)

 
 
John Keith
Guest
Posts: n/a
 
      3rd Jan 2010
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
(E-Mail Removed)
 
Reply With Quote
 
 
 
 
Gary Keramidas
Guest
Posts: n/a
 
      3rd Jan 2010
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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
> (E-Mail Removed)


 
Reply With Quote
 
Mishell
Guest
Posts: n/a
 
      3rd Jan 2010

Sub ASCII_Value_Of_a_Character()

MsgBox Asc(Mid("â?¢", 1, 1))

End Sub


Sub Replace_By_Something()

a = Cells(1, 1).Formula

Replace_What = "â?¢"
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

End Sub


Docm

"John Keith" <(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed)...
>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
> (E-Mail Removed)



 
Reply With Quote
 
John Keith
Guest
Posts: n/a
 
      3rd Jan 2010
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
(E-Mail Removed)
 
Reply With Quote
 
John Keith
Guest
Posts: n/a
 
      3rd Jan 2010
On Sun, 3 Jan 2010 11:44:32 +0000, joel <(E-Mail Removed)>
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
(E-Mail Removed)
 
Reply With Quote
 
John Keith
Guest
Posts: n/a
 
      3rd Jan 2010
Mishell,

Thank oyu for your suggestion. It appears to be somewhat similar to
the method Joel suggested and I will give it a try later today as
well.



John Keith
(E-Mail Removed)
 
Reply With Quote
 
John Keith
Guest
Posts: n/a
 
      4th Jan 2010
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
(E-Mail Removed)
 
Reply With Quote
 
Gary Keramidas
Guest
Posts: n/a
 
      4th Jan 2010
glad you got it worked out.

--


Gary Keramidas
Excel 2003


"John Keith" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
> (E-Mail Removed)


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Length greater than 255 Characters =?Utf-8?B?Um9kIEVsRWQ=?= Microsoft Access 4 25th Apr 2007 09:42 PM
how do i display cell contents greater than 255 characters in a t. =?Utf-8?B?UmljaGFyZCBMYW1leQ==?= Microsoft Excel Misc 1 13th Feb 2006 03:45 AM
Problems in IE 6.0 with cyrillic characters greater than 0x0450 ? =?Utf-8?B?ZGFiZTc2?= Windows XP Internet Explorer 5 13th Jan 2006 07:15 PM
Cell Content Greater than 24 Characters. dlnorris Microsoft Excel Worksheet Functions 3 14th Oct 2005 09:18 PM
Return records greater than 3 characters mate Microsoft Access Queries 1 3rd Sep 2003 06:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:34 PM.