Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Making Excel understand the diffrence in capitialization?

Hey,

Interesting problem...How do I go about doing this? I need Excel to
understand the value of capitalized letters and not automatically
replace based on its value... Take a look at code below.

Sub Eng_to_code

Application.ScreenUpdating = False
ActiveCell.Replace What:="A", Replacement:="Ø"
ActiveCell.Replace What:="a", Replacement:="-æ-"

End Sub

Sub Code_to_Eng

Application.ScreenUpdating = False
ActiveCell.Replace What:="Ø", Replacement:="A"
ActiveCell.Replace What:="-æ-", Replacement:="a"

End Sub

The problem is the code automatically makes the value of the cell into
"ØØ" if "Aa" is the active cell value when it should be "Ø-æ-". Any
ideas on how to get VB to understand the diffrence of a capital
letter? Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Making Excel understand the diffrence in capitialization?

What about setting the MatchCase argument to True?

NickHK

wrote in message
ups.com...
Hey,

Interesting problem...How do I go about doing this? I need Excel to
understand the value of capitalized letters and not automatically
replace based on its value... Take a look at code below.

Sub Eng_to_code

Application.ScreenUpdating = False
ActiveCell.Replace What:="A", Replacement:="Ø"
ActiveCell.Replace What:="a", Replacement:="-æ-"

End Sub

Sub Code_to_Eng

Application.ScreenUpdating = False
ActiveCell.Replace What:="Ø", Replacement:="A"
ActiveCell.Replace What:="-æ-", Replacement:="a"

End Sub

The problem is the code automatically makes the value of the cell into
"ØØ" if "Aa" is the active cell value when it should be "Ø-æ-". Any
ideas on how to get VB to understand the diffrence of a capital
letter? Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Making Excel understand the diffrence in capitialization?

Selection.Replace What:="A", Replacement:="Ø", MatchCase:=True

hth,

Doug

wrote in message
ups.com...
Hey,

Interesting problem...How do I go about doing this? I need Excel to
understand the value of capitalized letters and not automatically
replace based on its value... Take a look at code below.

Sub Eng_to_code

Application.ScreenUpdating = False
ActiveCell.Replace What:="A", Replacement:="Ø"
ActiveCell.Replace What:="a", Replacement:="-æ-"

End Sub

Sub Code_to_Eng

Application.ScreenUpdating = False
ActiveCell.Replace What:="Ø", Replacement:="A"
ActiveCell.Replace What:="-æ-", Replacement:="a"

End Sub

The problem is the code automatically makes the value of the cell into
"ØØ" if "Aa" is the active cell value when it should be "Ø-æ-". Any
ideas on how to get VB to understand the diffrence of a capital
letter? Thanks!


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Making Excel understand the diffrence in capitialization?

On Feb 12, 10:08 pm, "NickHK" wrote:
What about setting the MatchCase argument to True?

NickHK

wrote in message

ups.com...
Hey,

Interesting problem...How do I go about doing this? I need Excel to
understand the value of capitalized letters and not automatically
replace based on its value... Take a look at code below.

Sub Eng_to_code

Application.ScreenUpdating = False
ActiveCell.Replace What:="A", Replacement:="Ø"
ActiveCell.Replace What:="a", Replacement:="-æ-"

End Sub

Sub Code_to_Eng

Application.ScreenUpdating = False
ActiveCell.Replace What:="Ø", Replacement:="A"
ActiveCell.Replace What:="-æ-", Replacement:="a"

End Sub

The problem is the code automatically makes the value of the cell into
"ØØ" if "Aa" is the active cell value when it should be "Ø-æ-". Any
ideas on how to get VB to understand the diffrence of a capital
letter? Thanks!


Nick,

Tried the following... and still had no resolution. The screen
flickers but it doesn't do anything more...maybe I'm missing
something? Thanks for the help man!

Sub Eng_to_code()
Application.ScreenUpdating = False
ActiveCell.Replace What:="A", Replacement:="Ø", MatchCase:=True
ActiveCell.Replace What:="a", Replacement:="-æ-", MatchCase:=True
End Sub


Sub Code_to_Eng()
Application.ScreenUpdating = False
ActiveCell.Replace What:="Ø", Replacement:="A", MatchCase:=True
ActiveCell.Replace What:="-æ-", Replacement:="a", MatchCase:=True
End Sub

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Making Excel understand the diffrence in capitialization?

On Feb 12, 10:22 pm, "Doug Glancy"
wrote:
Selection.Replace What:="A", Replacement:="Ø", MatchCase:=True

hth,

Doug

wrote in message

ups.com...
Hey,

Interesting problem...How do I go about doing this? I need Excel to
understand the value of capitalized letters and not automatically
replace based on its value... Take a look at code below.

Sub Eng_to_code

Application.ScreenUpdating = False
ActiveCell.Replace What:="A", Replacement:="Ø"
ActiveCell.Replace What:="a", Replacement:="-æ-"

End Sub

Sub Code_to_Eng

Application.ScreenUpdating = False
ActiveCell.Replace What:="Ø", Replacement:="A"
ActiveCell.Replace What:="-æ-", Replacement:="a"

End Sub

The problem is the code automatically makes the value of the cell into
"ØØ" if "Aa" is the active cell value when it should be "Ø-æ-". Any
ideas on how to get VB to understand the diffrence of a capital
letter? Thanks!


Thanks for the input with teh Selection.Replace etc.. but that didn't
do anything diffrent.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Making Excel understand the diffrence in capitialization?

Works for me.
Are you sure ActiveCell is pointing to the correct cell that contains such
chars ?

NickHK

wrote in message
oups.com...
On Feb 12, 10:08 pm, "NickHK" wrote:
What about setting the MatchCase argument to True?

NickHK

wrote in message

ups.com...
Hey,

Interesting problem...How do I go about doing this? I need Excel to
understand the value of capitalized letters and not automatically
replace based on its value... Take a look at code below.

Sub Eng_to_code

Application.ScreenUpdating = False
ActiveCell.Replace What:="A", Replacement:="Ø"
ActiveCell.Replace What:="a", Replacement:="-æ-"

End Sub

Sub Code_to_Eng

Application.ScreenUpdating = False
ActiveCell.Replace What:="Ø", Replacement:="A"
ActiveCell.Replace What:="-æ-", Replacement:="a"

End Sub

The problem is the code automatically makes the value of the cell into
"ØØ" if "Aa" is the active cell value when it should be "Ø-æ-". Any
ideas on how to get VB to understand the diffrence of a capital
letter? Thanks!


Nick,

Tried the following... and still had no resolution. The screen
flickers but it doesn't do anything more...maybe I'm missing
something? Thanks for the help man!

Sub Eng_to_code()
Application.ScreenUpdating = False
ActiveCell.Replace What:="A", Replacement:="Ø", MatchCase:=True
ActiveCell.Replace What:="a", Replacement:="-æ-", MatchCase:=True
End Sub


Sub Code_to_Eng()
Application.ScreenUpdating = False
ActiveCell.Replace What:="Ø", Replacement:="A", MatchCase:=True
ActiveCell.Replace What:="-æ-", Replacement:="a", MatchCase:=True
End Sub


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Making Excel understand the diffrence in capitialization?

On Feb 12, 10:35 pm, "NickHK" wrote:
Works for me.
Are you sure ActiveCell is pointing to the correct cell that contains such
chars ?

NickHK

wrote in message

oups.com...
On Feb 12, 10:08 pm, "NickHK" wrote:





What about setting the MatchCase argument to True?


NickHK


wrote in message


oups.com...
Hey,


Interesting problem...How do I go about doing this? I need Excel to
understand the value of capitalized letters and not automatically
replace based on its value... Take a look at code below.


Sub Eng_to_code


Application.ScreenUpdating = False
ActiveCell.Replace What:="A", Replacement:="Ø"
ActiveCell.Replace What:="a", Replacement:="-æ-"


End Sub


Sub Code_to_Eng


Application.ScreenUpdating = False
ActiveCell.Replace What:="Ø", Replacement:="A"
ActiveCell.Replace What:="-æ-", Replacement:="a"


End Sub


The problem is the code automatically makes the value of the cell into
"ØØ" if "Aa" is the active cell value when it should be "Ø-æ-". Any
ideas on how to get VB to understand the diffrence of a capital
letter? Thanks!


Nick,

Tried the following... and still had no resolution. The screen
flickers but it doesn't do anything more...maybe I'm missing
something? Thanks for the help man!

Sub Eng_to_code()
Application.ScreenUpdating = False
ActiveCell.Replace What:="A", Replacement:="Ø", MatchCase:=True
ActiveCell.Replace What:="a", Replacement:="-æ-", MatchCase:=True
End Sub

Sub Code_to_Eng()
Application.ScreenUpdating = False
ActiveCell.Replace What:="Ø", Replacement:="A", MatchCase:=True
ActiveCell.Replace What:="-æ-", Replacement:="a", MatchCase:=True
End Sub- Hide quoted text -

- Show quoted text -


ActiveCell = The right cell...Ill try absolute refrencing but I'm
using Excel 2003 so I don't know if that makes a diffrence? The code's
logic make sense but it's not doing what I need it to do. I ran some
code that did Application.Calculation = xlManual earlier...could this
be messing it up?

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Making Excel understand the diffrence in capitialization?

On Feb 12, 10:40 pm, wrote:
On Feb 12, 10:35 pm, "NickHK" wrote:





Works for me.
Are you sure ActiveCell is pointing to the correct cell that contains such
chars ?


NickHK


wrote in message


roups.com...
On Feb 12, 10:08 pm, "NickHK" wrote:


What about setting the MatchCase argument to True?


NickHK


wrote in message


oups.com...
Hey,


Interesting problem...How do I go about doing this? I need Excel to
understand the value of capitalized letters and not automatically
replace based on its value... Take a look at code below.


Sub Eng_to_code


Application.ScreenUpdating = False
ActiveCell.Replace What:="A", Replacement:="Ø"
ActiveCell.Replace What:="a", Replacement:="-æ-"


End Sub


Sub Code_to_Eng


Application.ScreenUpdating = False
ActiveCell.Replace What:="Ø", Replacement:="A"
ActiveCell.Replace What:="-æ-", Replacement:="a"


End Sub


The problem is the code automatically makes the value of the cell into
"ØØ" if "Aa" is the active cell value when it should be "Ø-æ-". Any
ideas on how to get VB to understand the diffrence of a capital
letter? Thanks!


Nick,


Tried the following... and still had no resolution. The screen
flickers but it doesn't do anything more...maybe I'm missing
something? Thanks for the help man!


Sub Eng_to_code()
Application.ScreenUpdating = False
ActiveCell.Replace What:="A", Replacement:="Ø", MatchCase:=True
ActiveCell.Replace What:="a", Replacement:="-æ-", MatchCase:=True
End Sub


Sub Code_to_Eng()
Application.ScreenUpdating = False
ActiveCell.Replace What:="Ø", Replacement:="A", MatchCase:=True
ActiveCell.Replace What:="-æ-", Replacement:="a", MatchCase:=True
End Sub- Hide quoted text -


- Show quoted text -


ActiveCell = The right cell...Ill try absolute refrencing but I'm
using Excel 2003 so I don't know if that makes a diffrence? The code's
logic make sense but it's not doing what I need it to do. I ran some
code that did Application.Calculation = xlManual earlier...could this
be messing it up?- Hide quoted text -

- Show quoted text -


OK great! Figure it out...Excel just needed a swift kick in the butt.
(Had to reboot Excel). It works great! Thanks alot Nick and Doug!

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Making Excel understand the diffrence in capitialization?

The selection part was unimportant actually - it's the "MatchCase := True"
that you need. That's telling Excel to search in a case-sensitive manner.

You could try turning on the macro recorder and doing the search the way you
want - be sure to check the "Match Case" option - and see what you get. It
should look similar to what Nick and I have suggested.

hth,

Doug

wrote in message
oups.com...
On Feb 12, 10:22 pm, "Doug Glancy"
wrote:
Selection.Replace What:="A", Replacement:="Ø", MatchCase:=True

hth,

Doug

wrote in message

ups.com...
Hey,

Interesting problem...How do I go about doing this? I need Excel to
understand the value of capitalized letters and not automatically
replace based on its value... Take a look at code below.

Sub Eng_to_code

Application.ScreenUpdating = False
ActiveCell.Replace What:="A", Replacement:="Ø"
ActiveCell.Replace What:="a", Replacement:="-æ-"

End Sub

Sub Code_to_Eng

Application.ScreenUpdating = False
ActiveCell.Replace What:="Ø", Replacement:="A"
ActiveCell.Replace What:="-æ-", Replacement:="a"

End Sub

The problem is the code automatically makes the value of the cell into
"ØØ" if "Aa" is the active cell value when it should be "Ø-æ-". Any
ideas on how to get VB to understand the diffrence of a capital
letter? Thanks!


Thanks for the input with teh Selection.Replace etc.. but that didn't
do anything diffrent.


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
Why doesn't Excel understand what 'Manual' for Calculations? msnyc07 Excel Discussion (Misc queries) 4 February 4th 10 10:24 PM
Does Excel understand Latitude and Longitude (GPS) co-ordinates? Simpson Excel Discussion (Misc queries) 2 February 28th 07 07:47 PM
How many workbooks and worksheets can Excel understand? Mike Excel Discussion (Misc queries) 1 February 10th 06 01:58 PM
.01 or .02 diffrence in computation Dr.How via OfficeKB.com Excel Discussion (Misc queries) 1 September 30th 05 12:29 PM
Project two - Diffrence Sheet Barry Wright Excel Programming 2 December 6th 04 08:33 AM


All times are GMT +1. The time now is 09:54 AM.

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

About Us

"It's about Microsoft Excel"