David has attended:
Excel Intermediate course
Excel Advanced course
Access Intermediate course
Access Advanced course
Macros
Macro for changing a range of cells from lower case to upper case. The same keyboard shortcut as the toggle as 'shift + F3' in Word
RE: Macros
David - try this
Create the macro:
Sub MyChangeCase
for each GetCell in selection
GetCell.value = ucase(GetCell.value)
next GetCell
end sub
Select the cells on the spreadsheet and then run the macro
RE: Macros
Hi David
Thank You for your question
The following code will solve the problem for you. Simply create a module in the VBE and paste the code into it
Sub UcaseFormatter()
Dim varRange As Range
Dim intRowCount As Integer
Dim intColCount As Integer
Set varRange = Range("A1").CurrentRegion
For intRowCount = 1 To varRange.Rows.Count
For intColCount = 1 To varRange.Columns.Count
Range("a1").Cells(intRowCount, intColCount).Value = UCase(Range("a1").Cells(intRowCount, intColCount).Value)
Next intColCount
Next intRowCount
End Sub
In this example the range of cells in question must start at cell "A1"
Regards
Stephen