ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   UPPER function (https://www.excelbanter.com/excel-worksheet-functions/257596-upper-function.html)

yogart

UPPER function
 
I have a spreadsheet with cell filled with characters of both upper and lower
case, and I need to change them all to upper case. I have played around
using the UPPER function on another sheet and then copying the subject cell
nmuber on it, and then doing massive copying on the paste sheet. Is there a
simpler way to convert sheet to all upper case? It would be great if I could
highlight the whole page. push a button and it then all upper case. Any
suggestions?
--
John 3:16-19

Mike H

UPPER function
 
Hi,

You could use this macro. Alt+F11 to open VB editor. Right click
'ThisWorkbook' and insert module and paste the code in and run it

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

End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"yogart" wrote:

I have a spreadsheet with cell filled with characters of both upper and lower
case, and I need to change them all to upper case. I have played around
using the UPPER function on another sheet and then copying the subject cell
nmuber on it, and then doing massive copying on the paste sheet. Is there a
simpler way to convert sheet to all upper case? It would be great if I could
highlight the whole page. push a button and it then all upper case. Any
suggestions?
--
John 3:16-19


Gord Dibben

UPPER function
 
Mike

Why would you recommend Thisworkbook module and not a regular module?


Gord

On Sun, 28 Feb 2010 13:52:01 -0800, Mike H
wrote:

Hi,

You could use this macro. Alt+F11 to open VB editor. Right click
'ThisWorkbook' and insert module and paste the code in and run it

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

End Sub




All times are GMT +1. The time now is 09:07 PM.

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