Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Nae
 
Posts: n/a
Default Change case setting from lower to upper with current complete doc

I have been given an excel spreadsheet which requires certain parts of the
document to be changed from lower case to upper case.
I tried using the help topic and the formula it gives you, does not inform
of where you are to type the formula i.e. in the cell where the current text
is? or any other easy ways of making these changes.

Please assist
  #2   Report Post  
Rowan Drummond
 
Posts: n/a
Default Change case setting from lower to upper with current completedoc

You can't use a formula in the same cell that contains your data so you
would have to put the formula in another (unused) cell.

So if you have "mytext" in cell A1, in cell B1 you cound enter the
formula =UPPER(A1). This will return the result "MYTEXT" in cell B1. You
could then copy B1 and pastespecial values over cell A1 before deleting
the formula from B1.

Alternately, you could use a macro to change the text in place. Select
all the cells you want changed and then run this macro:

Sub UpperCase()
Dim r As Range
For Each r In Selection
If Not r.HasFormula Then r.Value = UCase(r.Value)
Next r
End Sub

If you are new to macros see:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Hope this helps
Rowan

Nae wrote:
I have been given an excel spreadsheet which requires certain parts of the
document to be changed from lower case to upper case.
I tried using the help topic and the formula it gives you, does not inform
of where you are to type the formula i.e. in the cell where the current text
is? or any other easy ways of making these changes.

Please assist

  #3   Report Post  
Paul D. Simon
 
Posts: n/a
Default Change case setting from lower to upper with current complete doc

Highlight the cell(s) you want changed and run this macro.

For Each c In Selection.Cells
c.Value = UCase$(c.Value)
Next c

  #4   Report Post  
Paul D. Simon
 
Posts: n/a
Default Change case setting from lower to upper with current complete doc

For anyone who may have read my response above, David Ritchie was kind
enough to point out to me a very dangerous and potentially disastrous
result of my solution in that my code would inadvertantly (and
unknowingly to the user) change formulas to values.

Rowan's code above works fine and avoids the pitfalls of mine.
Additionally, you can check out
http://www.mvps.org/dmcritchie/excel/proper.htm#upper

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
Change source text in Excel from all caps to upper and lower case. JoanS Excel Discussion (Misc queries) 2 December 16th 04 02:11 AM
Identifying the Active Fill Color Steve Conary Excel Discussion (Misc queries) 3 December 9th 04 04:45 AM
changing lower case to upper case T. Campbell Excel Discussion (Misc queries) 1 December 8th 04 05:37 PM
change typed text to upper case CT Cameron Excel Discussion (Misc queries) 2 November 30th 04 01:07 AM
How do I change existing text from lower case to upper case CT Cameron Excel Discussion (Misc queries) 2 November 30th 04 01:07 AM


All times are GMT +1. The time now is 10:47 AM.

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"