Weird Excel Format Problem
Weird Excel Format Problem
(OP)
This cell was copied from one Excel sheet to another. The original was all in the font used for "Assy". How did only part of it get changed and more importantly how to change it back? Copy format doesn't work.
Grease Adaptor Assy, FWD
If I delete the "Adaptor" part and start typing in its place it uses the "Assy" font.
Grease Adaptor Assy, FWD
If I delete the "Adaptor" part and start typing in its place it uses the "Assy" font.





RE: Weird Excel Format Problem
RE: Weird Excel Format Problem
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Weird Excel Format Problem
RE: Weird Excel Format Problem
David
RE: Weird Excel Format Problem
OK, what I did was copy the url from the Step 3 Attachment. Don't know why I would have to do that but I'll eventually learn.
Thanks,
Roger
ht
RE: Weird Excel Format Problem
The fix that worked for me was:
1) Copy all the text and paste into NotePad.
(Notice there are a bunch of other characters there after all! Anyway...)
2) Now copy everything in NotePad.
3) Switch back to Excel.
4) Then Edit/Paste Special and choose Values.
Ken
RE: Weird Excel Format Problem
David
RE: Weird Excel Format Problem
What you have in your spreadsheet are Unicode characters. It's not a formatting issue. If you select a cell and run the code below, it will put the actual Unicode values and the Ascii values into the debug output pane. Run the macro on a cell containing the "weird" text and the top line (actual Unicode character codes) won't match the second line (ASCII values for that same letter). Run the macro on a cell that contains plain ol' text and the two lines will match.
-handleman, CSWP (The new, easy test)
RE: Weird Excel Format Problem
CODE
Private Const OFFSET_2 = 65536
Sub FullUnicodeDisplay()
Dim myCharString As String
Dim myCharString2 As String
Dim myString As String
Dim StrLen As Long
Dim myNum As Long
myString = ActiveCell.Text
StrLen = Len(myString)
For i = 1 To StrLen
myNum = IntegerToUnsigned(AscW(Mid(myString, i, 1)))
myCharString = myCharString & myNum & " "
myCharString2 = myCharString2 & Asc(Mid(myString, i, 1)) & " "
Next i
Debug.Print myCharString
Debug.Print myCharString2
End Sub
Function IntegerToUnsigned(Value As Integer) As Long
If Value < 0 Then
IntegerToUnsigned = Value + OFFSET_2
Else
IntegerToUnsigned = Value
End If
End Function
-handleman, CSWP (The new, easy test)
RE: Weird Excel Format Problem
CODE
Dim myString As String
Dim StrLen As Long
Dim myCell As Range
Dim NewStr As String
Dim i As Long
myString = ActiveCell.Text
For Each myCell In Selection.Cells
myString = myCell.Text
StrLen = Len(myString)
NewStr = ""
For i = 1 To StrLen
NewStr = NewStr & Chr(Asc(Mid(myString, i, 1)))
Next i
myCell.Value = NewStr
Next myCell
End Sub
-handleman, CSWP (The new, easy test)
RE: Weird Excel Format Problem
I'll try the code. Thanks,
Roger
RE: Weird Excel Format Problem
The code worked fine but had a problem converting something that ended up displaying as a "?". I added a few lines to detect that and replace it with a space.
Thanks,
Roger