Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default how do I use macro to find and replace unicode characters

I have database files that I import into Excel 2003. In certain columns
there are unicode characters, e.g. •œ . I use the find and replace function
to replace these charactrers with numbers. I can do this fine by hand. When
I record a macro to do the same, it doesn't work. The macro replaces the •œ
characters with the plus sign "+" which breaks it. I've tried editing the
macro by placing the •œ characters in the formula, but that doesn't work
either. The editor won't allow it, replacing the •œ with a question mark "?".
Does anyone know how I can get this to work. I do this almost daily I would
hate to do it manually every time.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default how do I use macro to find and replace unicode characters

Can you give us a hint of what you want to replace them with? You say
"numbers"... what numbers and how are the numbers related to the symbols
(for example, are they their ASCII code)? Is replacing them with numbers all
you want to do to them, or is that in intermediate step on the way to some
other functionality? Also, are these symbols confined to specific columns
(if so, which ones) or can they be anywhere within your data?

--
Rick (MVP - Excel)


"CliffG" wrote in message
...
I have database files that I import into Excel 2003. In certain columns
there are unicode characters, e.g. •œ . I use the find and replace
function
to replace these charactrers with numbers. I can do this fine by hand.
When
I record a macro to do the same, it doesn't work. The macro replaces the
•œ
characters with the plus sign "+" which breaks it. I've tried editing the
macro by placing the •œ characters in the formula, but that doesn't work
either. The editor won't allow it, replacing the •œ with a question mark
"?".
Does anyone know how I can get this to work. I do this almost daily I
would
hate to do it manually every time.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default how do I use macro to find and replace unicode characters

Thanks in advance for your help.

In the original database the symbols represented fractions, i.e., ΒΌ, Β½, or
ΒΎ. I replace these with their decimal equivilents .25, .50, .75. They are
contained in two columns only, in this case G and I. I basically want save
it in that format. The saved spreadsheet is ultimately imported into another
database.

As I mentioned, I can do it fine by pasting the symbols from character map
into "find" and typing in their replacement values. I can save the
spreadsheet, import it later, everything is right. When I try to record the
steps in the macro, it just doesn't record it correctly. When I run the
macro it doesn't find anything to replace because it's looking for "+"
instead of the symbols.

Thanks again.

"Rick Rothstein" wrote:

Can you give us a hint of what you want to replace them with? You say
"numbers"... what numbers and how are the numbers related to the symbols
(for example, are they their ASCII code)? Is replacing them with numbers all
you want to do to them, or is that in intermediate step on the way to some
other functionality? Also, are these symbols confined to specific columns
(if so, which ones) or can they be anywhere within your data?

--
Rick (MVP - Excel)


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default how do I use macro to find and replace unicode characters

I'm pretty sure we can write a macro for you ... can you post the conversion
chart (Unicode character numbers against the fractional values you want it
to be)?

--
Rick (MVP - Excel)


"CliffG" wrote in message
...
Thanks in advance for your help.

In the original database the symbols represented fractions, i.e., ΒΌ, Β½, or
ΒΎ. I replace these with their decimal equivilents .25, .50, .75. They
are
contained in two columns only, in this case G and I. I basically want
save
it in that format. The saved spreadsheet is ultimately imported into
another
database.

As I mentioned, I can do it fine by pasting the symbols from character map
into "find" and typing in their replacement values. I can save the
spreadsheet, import it later, everything is right. When I try to record
the
steps in the macro, it just doesn't record it correctly. When I run the
macro it doesn't find anything to replace because it's looking for "+"
instead of the symbols.

Thanks again.

"Rick Rothstein" wrote:

Can you give us a hint of what you want to replace them with? You say
"numbers"... what numbers and how are the numbers related to the symbols
(for example, are they their ASCII code)? Is replacing them with numbers
all
you want to do to them, or is that in intermediate step on the way to
some
other functionality? Also, are these symbols confined to specific columns
(if so, which ones) or can they be anywhere within your data?

--
Rick (MVP - Excel)



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default how do I use macro to find and replace unicode characters

Absolutely :)

•› U+255B .75
•œ U+255C .50
• U+255D .25


"Rick Rothstein" wrote:

I'm pretty sure we can write a macro for you ... can you post the conversion
chart (Unicode character numbers against the fractional values you want it
to be)?

--
Rick (MVP - Excel)


"CliffG" wrote in message
...
Thanks in advance for your help.

In the original database the symbols represented fractions, i.e., ΒΌ, Β½, or
ΒΎ. I replace these with their decimal equivilents .25, .50, .75. They
are
contained in two columns only, in this case G and I. I basically want
save
it in that format. The saved spreadsheet is ultimately imported into
another
database.

As I mentioned, I can do it fine by pasting the symbols from character map
into "find" and typing in their replacement values. I can save the
spreadsheet, import it later, everything is right. When I try to record
the
steps in the macro, it just doesn't record it correctly. When I run the
macro it doesn't find anything to replace because it's looking for "+"
instead of the symbols.

Thanks again.

"Rick Rothstein" wrote:

Can you give us a hint of what you want to replace them with? You say
"numbers"... what numbers and how are the numbers related to the symbols
(for example, are they their ASCII code)? Is replacing them with numbers
all
you want to do to them, or is that in intermediate step on the way to
some
other functionality? Also, are these symbols confined to specific columns
(if so, which ones) or can they be anywhere within your data?

--
Rick (MVP - Excel)






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default how do I use macro to find and replace unicode characters

Give this macro a try...

Sub ConvertSymbolsToValues()
Dim X As Long
Dim C As Range
With Worksheets("Sheet6").UsedRange
For X = 1 To 3
Set C = .Find(What:=ChrW(9562 + X), LookAt:=xlPart)
If Not C Is Nothing Then
Do
C.Value = Replace(C.Value, ChrW(9562 + X), X / 4)
Set C = .FindNext(C)
Loop While Not C Is Nothing
End If
Next
End With
End Sub

--
Rick (MVP - Excel)


"CliffG" wrote in message
...
Absolutely :)

•› U+255B .75
•œ U+255C .50
• U+255D .25


"Rick Rothstein" wrote:

I'm pretty sure we can write a macro for you ... can you post the
conversion
chart (Unicode character numbers against the fractional values you want
it
to be)?

--
Rick (MVP - Excel)


"CliffG" wrote in message
...
Thanks in advance for your help.

In the original database the symbols represented fractions, i.e., ΒΌ, Β½,
or
ΒΎ. I replace these with their decimal equivilents .25, .50, .75. They
are
contained in two columns only, in this case G and I. I basically want
save
it in that format. The saved spreadsheet is ultimately imported into
another
database.

As I mentioned, I can do it fine by pasting the symbols from character
map
into "find" and typing in their replacement values. I can save the
spreadsheet, import it later, everything is right. When I try to
record
the
steps in the macro, it just doesn't record it correctly. When I run
the
macro it doesn't find anything to replace because it's looking for "+"
instead of the symbols.

Thanks again.

"Rick Rothstein" wrote:

Can you give us a hint of what you want to replace them with? You say
"numbers"... what numbers and how are the numbers related to the
symbols
(for example, are they their ASCII code)? Is replacing them with
numbers
all
you want to do to them, or is that in intermediate step on the way to
some
other functionality? Also, are these symbols confined to specific
columns
(if so, which ones) or can they be anywhere within your data?

--
Rick (MVP - Excel)





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find & Replace Special characters with numbers Soccer Excel Discussion (Misc queries) 2 March 27th 09 06:41 PM
FIND and REPLACE characters needed Peter C New Users to Excel 2 February 10th 06 07:09 PM
FIND and REPLACE characters needed Peter C Excel Worksheet Functions 0 February 8th 06 09:14 PM
How do I find replace special characters? zzapper Excel Discussion (Misc queries) 1 June 27th 05 06:05 PM
Find and replace unusual characters ... bbddvv Excel Discussion (Misc queries) 1 June 1st 05 12:53 AM


All times are GMT +1. The time now is 02:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"