Asked By
anonymous
7060 points
N/A
Posted on - 04/15/2011
Excel macro or script that can make all data into caps in a excel sheet Some easy way which I can use to make all words CAPS.
Thanks.
Mahesh
Excel or Macro Script: Which way is better to use in Excel?
Hi,
Here is my contribution, I think this is the solution you need:
Sub change_caps()
Dim sh As Worksheet
Set sh = ActiveSheet
Dim cll As Range
For Each sh In ActiveWorkbook.Sheets
For Each cll In sh.UsedRange
cll.Value = UCase(cll)
Next cll
Next sh
End Sub
Regards,
Prakash
Excel or Macro Script: Which way is better to use in Excel?
Good one Prakash. Here is my solution. This can be used in cases where you want all data in all sheets in caps always.
It changes as we enter.
Public Sub CaseChanger()
Dim Cell As Range
Application.EnableEvents = False
For Each Cell In Selection
If Not Cell.HasFormula Then If Not IsNumeric(Cell) And Len(Cell) > 1 Then Cell = Application.Proper(Cell)
Next Cell
Application.EnableEvents = True
End Sub
Excel or Macro Script: Which way is better to use in Excel?
Here's my solution: Sub Uppercase() ' Loop to cycle through each cell in the specified range. For Each x In Range("A1:A5") ' Change the text in the range to uppercase letters. x.Value = UCase(x.value) Next End Sub Correct me if I'm wrong.
Regards,
Fraklin