Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I change the case of text | New Users to Excel | |||
How do I change default font for all new comments in Office 2003? | Excel Discussion (Misc queries) | |||
Change Case button? | Excel Discussion (Misc queries) | |||
Amount or Numbers in Words | New Users to Excel | |||
Formula to list unique values | Excel Worksheet Functions |