how to make whole work sheet in to upper case

M

Mahesh

hi
i could not convert upper case words or sentence to lower case or visa versa

like.. if "how to make whole work sheet in to upper case" this to be made
to upper case.. how could this be done.. plz help

Regards
Mahesh
 
M

Mike H

Hi,

Try this,

Right click the sheet tab, view code and paste this in and run it

Sub versive()
For Each c In ActiveSheet.UsedRange
If Not c.HasFormula Then
c.Value = UCase(c.Value)
End If
Next
End Sub
 
G

Gord Dibben

Sub Upper()
Dim Cell As Range
Application.ScreenUpdating = False
For Each Cell In Selection
Cell.Formula = UCase(Cell.Formula)
Next
Application.ScreenUpdating = True
End Sub


Sub Lower()
Dim Cell As Range
Application.ScreenUpdating = False
For Each Cell In Selection
Cell.Formula = LCase(Cell.Formula)
Next
Application.ScreenUpdating = True
End Sub


Sub Proper()
Dim Cell As Range
Application.ScreenUpdating = False
For Each Cell In Selection
Cell.Formula = Application.Proper(Cell.Formula)
Next
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP
 
B

BT

Hi Mahesh

An easier approach would be to use the =upper, =lower, and =proper
functions. Let's say you want to convert a text string in cell A1 to upper
case. Select an empty cell and enter the formula =upper(A1). Now copy and
paste special / value back into cell A1.
 
G

Gord Dibben

How would that be easier than running a macro to change all at once without
formulas in helper cells then copy/pasting?

Assume Mahesh had multiple columns and rows.


Gord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top