ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Capitalizing Letters in multiple column data (https://www.excelbanter.com/excel-worksheet-functions/118658-capitalizing-letters-multiple-column-data.html)

Karenatallied

Capitalizing Letters in multiple column data
 
I am trying to capitalize a single letter across multiple columns.. ie: any
data entered in column 7, 11, 15, 19, 23 and so on (in multiples of 4), I
want to automatically convert to the Capital equivalent. Each column has 250
lines as well.

From posts I've read, I understand that this can only be done through a
macro or through Visual Basic. Unfortunately, I am not that well versed in
the code for either.

Harald Staff provided this to someone else, and altho it will work for one
column, I don't know how to make it work for all.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim cel As Range
For Each cel In Target
If cel.Column = 2 Then
If cel.Formula < UCase$(cel.Formula) Then _
cel.Formula = UCase$(cel.Formula)
End If
Next
End Sub

Can anyone help????
Thanks so much,
Karen

Karenatallied

Capitalizing Letters in multiple column data
 
Also, the Proper function is not suitable for what I need... thanks.

"Karenatallied" wrote:

I am trying to capitalize a single letter across multiple columns.. ie: any
data entered in column 7, 11, 15, 19, 23 and so on (in multiples of 4), I
want to automatically convert to the Capital equivalent. Each column has 250
lines as well.

From posts I've read, I understand that this can only be done through a
macro or through Visual Basic. Unfortunately, I am not that well versed in
the code for either.

Harald Staff provided this to someone else, and altho it will work for one
column, I don't know how to make it work for all.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim cel As Range
For Each cel In Target
If cel.Column = 2 Then
If cel.Formula < UCase$(cel.Formula) Then _
cel.Formula = UCase$(cel.Formula)
End If
Next
End Sub

Can anyone help????
Thanks so much,
Karen


Bob Phillips

Capitalizing Letters in multiple column data
 
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cel As Range
For Each cel In Target
If cel.Column Mod 4 = 3 Then
If cel.Formula < UCase$(cel.Formula) Then _
cel.Formula = UCase$(cel.Formula)
End If
Next
End Sub


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Karenatallied" wrote in message
...
I am trying to capitalize a single letter across multiple columns.. ie:

any
data entered in column 7, 11, 15, 19, 23 and so on (in multiples of 4), I
want to automatically convert to the Capital equivalent. Each column has

250
lines as well.

From posts I've read, I understand that this can only be done through a
macro or through Visual Basic. Unfortunately, I am not that well versed

in
the code for either.

Harald Staff provided this to someone else, and altho it will work for one
column, I don't know how to make it work for all.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim cel As Range
For Each cel In Target
If cel.Column = 2 Then
If cel.Formula < UCase$(cel.Formula) Then _
cel.Formula = UCase$(cel.Formula)
End If
Next
End Sub

Can anyone help????
Thanks so much,
Karen





All times are GMT +1. The time now is 01:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com