Formerly Best Training
© 2024 STL. All Rights Reserved.
All prices offered for business users and exclude VAT. E&OE
2nd Floor, CA House, 1 Northey Street, Limehouse Basin, London, E14 8BT. United Kingdom
Forum home » Delegate support and help forum » Microsoft Excel Training and help » Macros
Resolved · Low Priority · Version 2007
David has attended:
Excel Intermediate course
Excel Advanced course
Access Intermediate course
Access Advanced course
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
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
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
|
Excel tip:Shortcut for deleting all comments in a spreadsheetIf you have entered multiple comments into a spreadsheet and wish to delete them all at once, you can achieve this by: |
We'll call during UK business hours
Server loaded in 0.08 secs.