Hi Leith
Thanks for your piece of coding although I was very puzzled as to your initial comment in that you said "This should slow you down".
I was also quite puzzled as to why the range should start from D2 in your example, as from your description I would expect the start of this range to be A2.
So I have made the following adjustments, which seem to work but correct me if I have done them wrong.
For my particular worksheet, I need Columns B, C, D, E, F & G to be in Proper Case and Column H to be in Upper Case.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim LastRow As Long
Dim Rng As Range
Dim StartCell As String
Dim StartRow As Long
StartCell = "B2"
With Range(StartCell)
C = .Column
StartRow = .Row
End With
LastRow = Cells(Rows.Count, C).End(xlUp).Row
LastRow = IIf(LastRow < StartRow, StartRow, LastRow)
Set Rng = Range(Cells(StartRow, C), Cells(LastRow, C))
Application.EnableEvents = False
Select Case Target.Column
Case 2, 3, 4, 5, 6, 7
Target = WorksheetFunction.Proper(Target)
Case 8
Target = UCase(Target)
End Select
Application.EnableEvents = True
End Sub
However, I also need to include a second range in the same worksheet, where Columns K, L, M, & N needs to be in Proper Case and Column O needs to be in Upper Case.
I assume that I could run a second piece of code as above but altered to accomodate the second range but is it possible to combine the two ranges within one piece of code.
TIA ...spellbound
Bookmarks