View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Doug Glancy[_7_] Doug Glancy[_7_] is offline
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.