Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
S. Avila
 
Posts: n/a
Default Change the font case of all cells in the worksheet to uppercase?

I have 450 rows of text that needs to be converted to uppercase. Any ideas
on how I do this without retyping the whole sheet?
  #2   Report Post  
bj
 
Posts: n/a
Default

Check out the =upper() function

"S. Avila" wrote:

I have 450 rows of text that needs to be converted to uppercase. Any ideas
on how I do this without retyping the whole sheet?

  #3   Report Post  
JulieD
 
Posts: n/a
Default

Hi

posted by Bob Phillips in response to a similar question earlier tonight ...
this code
----
Sub changecase()
For Each cell In Activesheet.UsedRange
If Not IsNumeric(cell.Value) Then
cell.Value = UCase(cell.Value)
End If
Next cell
End sub
---

to use, right mouse click on the sheet tab and choose view code on the left
hand side of the VBE window you should be able to see your workbook's name
(in bold & brackets) .. if not, choose view / project explorer ... then
choose insert / module - a piece of white paper should appear on the right,
copy & paste the code in there and then use alt & F11 to return to your
workbook, go to the sheet with your data, click in a cell .. choose tools /
macro / macros and click on changecase and then click on RUN.

PS it is always a good idea to do this on a copy of your workbook just in
case.

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"S. Avila" <S. wrote in message
...
I have 450 rows of text that needs to be converted to uppercase. Any ideas
on how I do this without retyping the whole sheet?



  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

FYI and hopefully a tip. Are you aware with that code, if there are any
formulas in the range they will be wiped leaving values only?

I realize OP mentioned text only but on the odd chance that some of the text
seen may be the results of formulas the following code would not affect
formulas. It will however, change case of any text returned by a formula as
well as in text-only cells.

Just select a range and run code.

Sub Upper_Case()
Dim cell As Range
Application.ScreenUpdating = False
For Each cell In Selection
cell.Formula = UCase(cell.Formula)
Next
Application.ScreenUpdating = True
End Sub

On Fri, 22 Apr 2005 23:25:56 +0800, "JulieD"
wrote:

Hi

posted by Bob Phillips in response to a similar question earlier tonight ...
this code
----
Sub changecase()
For Each cell In Activesheet.UsedRange
If Not IsNumeric(cell.Value) Then
cell.Value = UCase(cell.Value)
End If
Next cell
End sub
---

to use, right mouse click on the sheet tab and choose view code on the left
hand side of the VBE window you should be able to see your workbook's name
(in bold & brackets) .. if not, choose view / project explorer ... then
choose insert / module - a piece of white paper should appear on the right,
copy & paste the code in there and then use alt & F11 to return to your
workbook, go to the sheet with your data, click in a cell .. choose tools /
macro / macros and click on changecase and then click on RUN.

PS it is always a good idea to do this on a copy of your workbook just in
case.


  #5   Report Post  
JulieD
 
Posts: n/a
Default

Hi Gord

thanks for this, no i didn't realise the affect the code would have on
formulas ...

--
Cheers
JulieD

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
FYI and hopefully a tip. Are you aware with that code, if there are any
formulas in the range they will be wiped leaving values only?

I realize OP mentioned text only but on the odd chance that some of the
text
seen may be the results of formulas the following code would not affect
formulas. It will however, change case of any text returned by a formula
as
well as in text-only cells.

Just select a range and run code.

Sub Upper_Case()
Dim cell As Range
Application.ScreenUpdating = False
For Each cell In Selection
cell.Formula = UCase(cell.Formula)
Next
Application.ScreenUpdating = True
End Sub

On Fri, 22 Apr 2005 23:25:56 +0800, "JulieD"

wrote:

Hi

posted by Bob Phillips in response to a similar question earlier tonight
...
this code
----
Sub changecase()
For Each cell In Activesheet.UsedRange
If Not IsNumeric(cell.Value) Then
cell.Value = UCase(cell.Value)
End If
Next cell
End sub
---

to use, right mouse click on the sheet tab and choose view code on the
left
hand side of the VBE window you should be able to see your workbook's name
(in bold & brackets) .. if not, choose view / project explorer ... then
choose insert / module - a piece of white paper should appear on the
right,
copy & paste the code in there and then use alt & F11 to return to your
workbook, go to the sheet with your data, click in a cell .. choose tools
/
macro / macros and click on changecase and then click on RUN.

PS it is always a good idea to do this on a copy of your workbook just in
case.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I change the case of text date formats morph the dates/chang case New Users to Excel 2 April 18th 05 10:15 PM
How do I change default font for all new comments in Office 2003? Elena Excel Discussion (Misc queries) 1 April 1st 05 09:30 PM
Change Case button? Hiking Excel Discussion (Misc queries) 1 February 4th 05 09:23 PM
Amount or Numbers in Words ron New Users to Excel 6 December 24th 04 07:32 PM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM


All times are GMT +1. The time now is 04:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"