Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
rmm30
 
Posts: n/a
Default How do I make some columns all caps and others proper?


I am new to excel and do not have macro experience. I wd like to make
columns 1-6 All Caps when i hit tab or enter. then I want another
column to format proper caps when hit tabe or enter.

I copied a macro from this forum to make the first 6 columns ALL CAPS
which is working beautifully, see following:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column 6 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub


How do i now make column 7 format proper?


--
rmm30


------------------------------------------------------------------------
rmm30's Profile: http://www.excelforum.com/member.php...fo&userid=8358
View this thread: http://www.excelforum.com/showthread...hreadid=378562

  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

rmm30,

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Cells.Count 1 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
If Target.Column <= 6 Then
Target.Value = UCase(Target.Value)
Else
Target.Value = Application.Proper(Target.Value)
End If
ErrHandler:
Application.EnableEvents = True
End Sub

HTH,
Bernie
MS Excel MVP


"rmm30" wrote in
message ...

I am new to excel and do not have macro experience. I wd like to make
columns 1-6 All Caps when i hit tab or enter. then I want another
column to format proper caps when hit tabe or enter.

I copied a macro from this forum to make the first 6 columns ALL CAPS
which is working beautifully, see following:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column 6 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub


How do i now make column 7 format proper?


--
rmm30


------------------------------------------------------------------------
rmm30's Profile:

http://www.excelforum.com/member.php...fo&userid=8358
View this thread: http://www.excelforum.com/showthread...hreadid=378562



  #3   Report Post  
rmm30
 
Posts: n/a
Default


it worked perfectly. THANK YOU!


--
rmm30


------------------------------------------------------------------------
rmm30's Profile: http://www.excelforum.com/member.php...fo&userid=8358
View this thread: http://www.excelforum.com/showthread...hreadid=378562

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"