How to make large characters in some cell range to appear small

R

Ruslan

I was trying to make all characters entered in some cell range to be appeared
small by using the Event code provided by some generous people:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("I1:I100")) Is Nothing Then
Target(1).Value = LCase(Target(1).Value)
End If
Application.EnableEvents = True
End Sub

However, even though I put the mentioned code in "View code" section of my
sheet1 within Visual Basic (as I was advised) it seems that it did not not
affected the excel file. in other words, large characters in those cells
remain large.

What did I miss?...Should I do smth additional?...My knowledge of VB is
poor, cold someone assist me in this matter?
 
A

AlfD

Hi!

The code you are using will change the text you enter into a cell i
the range I1:I100 to lower case (Lcase) letters, or small letters a
you enter it.

Are you wanting something which will change existing text?

If so, you can develop the macro: e.g.

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("I1:I100")) Is Nothing Then
For i = 1 To 100
Target(i).Value = LCase(Target(i).Value)
Next
End If
Application.EnableEvents = True
End Sub

will let you paste mixed upper and lower case letters into column I an
will convert them to lower case.

But if you have a block of text entries in column I and you want to ge
rid of capital letters (upper case) you can use the Lcase workshee
function: =Lcase(B1) takes the contents of B1 and converts them int
lower case.


Al
 
D

Don Guillett

If you did this
right click sheet tab>view code>copy/paste>SAVE
then any text typed into col I will change to lower case
XXXX =xxxx
Pxxx=pxxx
etc
 
Top