ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Convert Case (https://www.excelbanter.com/excel-programming/440166-convert-case.html)

ordnance1[_2_]

Convert Case
 
My original post seems to have disappeared so here is a repeat.

I have to clean up a spreadsheet by converting the text in cells A6:B11999
to uppercase text. These cells contain text only. Is there a quick way to
accomplish this?

PY & Associates[_2_]

Convert Case
 
D6=upper(A6)
highlight D6
drag to E6
highlight D6:E6
drag to E11999


On Mar 3, 3:22*pm, "ordnance1" wrote:
My original post seems to have disappeared so here is a repeat.

I have to clean up a spreadsheet by converting the text in cells A6:B11999
to uppercase text. These cells contain text only. Is there a quick way to
accomplish this? *



Jacob Skaria

Convert Case
 
Since you have posted this query in Excel Programming group; I assume you
expect a VBA solution. You can try out the below macro. If you are new to
macros..

--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()


Sub Macro()
Dim cell As Range
For Each cell In Range("A6:B11999")
If cell.Text < "" Then cell.Value = UCase(cell.Text)
Next
End Sub

--
Jacob


"ordnance1" wrote:

My original post seems to have disappeared so here is a repeat.

I have to clean up a spreadsheet by converting the text in cells A6:B11999
to uppercase text. These cells contain text only. Is there a quick way to
accomplish this?
.


keiji kounoike

Convert Case
 
I would write some short macro. For example,

Sub Lower2Upper()
Dim rng As Range
Set rng = Range("A6:B11999")
rng.Value = Evaluate("=if(upper(" & rng.Address & ")<"""", upper(" & _
rng.Address & "),"""")")
End Sub

This would take some time, but only you need is just to wait to be done.

Keiji

ordnance1 wrote:
My original post seems to have disappeared so here is a repeat.

I have to clean up a spreadsheet by converting the text in cells
A6:B11999 to uppercase text. These cells contain text only. Is there a
quick way to accomplish this?


Rick Rothstein

Convert Case
 
This macro should be nicely efficient...

Sub MakeUpperCase()
Dim Cell As Range, CellRange As Range, FirstAddress As String
Set CellRange = Range("A6:B11999")
Set Cell = CellRange.Find("*", SearchDirection:=xlNext)
If Not Cell Is Nothing Then
FirstAddress = Cell.Address
Do
Cell.Value = UCase(Cell.Value)
Set Cell = CellRange.FindNext(Cell)
Loop While Cell.Address < FirstAddress And Not Cell Is Nothing
End If
End Sub

--
Rick (MVP - Excel)


"ordnance1" wrote in message
...
My original post seems to have disappeared so here is a repeat.

I have to clean up a spreadsheet by converting the text in cells A6:B11999
to uppercase text. These cells contain text only. Is there a quick way to
accomplish this?




All times are GMT +1. The time now is 12:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com