hi

Luckyshetty

New Member
Joined
Sep 6, 2010
Messages
17
i have spreadsheet in that 1st row should be in upper case, how do i format it so that even if text is typed in lower case it should go to upper case.

anybody help me on the same:)
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Something like this? (amend range as necessary)

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("[COLOR=red]A2:A10[/COLOR]")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True
End Sub

ALSO you are better off posting to the forum with meaningful title, it helps people see at a glance what you need help with and more people are inclinded to read your thread :)
 
Upvote 0
I would approach this by detecting when the worksheet changes, checking whether any of the changes are in row 1 and then converting any changed cells in row 1 to upper case.

Place this in the worksheet code module for the worksheet where you want this to happen:-
Code:
Option Explicit
 
Private Sub Worksheet_Change(ByVal Target As Range)
 
  Dim oCell As Range
 
  If Not Intersect(Target, Rows(1)) Is Nothing Then
    For Each oCell In Intersect(Target, Rows(1))
      If oCell.Value <> UCase(oCell.Value) Then oCell = UCase(oCell.Value) 
    Next oCell
  End If
 
End Sub
The worksheet code module is accessed by right-clicking the worksheet tab and selecting View Code.

Macros have to be enabled for this to work.

Always test new code on a copy of your workbook.
 
Last edited:
Upvote 0
Re: Conditional Formatting or data Validation

<HR style="BACKGROUND-COLOR: #ffffff; COLOR: #ffffff" SIZE=1> <!-- / icon and title --><!-- message -->
i have spreadsheet in that 1st row should be in upper case, how do i format it so that even if text is typed in lower case it should go to upper case.
No Macros

anybody help me on the same
 
Upvote 0
What you are asking can not be done without a macro. Perhaps data valadation could be used to force input of all upper case. The data validation formula would be =EXACT(A1,UPPER(A1))
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,152
Members
452,891
Latest member
JUSTOUTOFMYREACH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top