![]() |
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 |
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 |
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