PC Review


Reply
Thread Tools Rate Thread

How to i capitalize all words in an existing worksheet?

 
 
=?Utf-8?B?TWVnYUdybA==?=
Guest
Posts: n/a
 
      25th Sep 2007
I have a worksheet that contains approximately 2500 names. At this time all
names in in lowercase. I need to get them all into UPPERCASE. I know
there's got to be an easier way to do that rather then retyping each name.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWlrZSBI?=
Guest
Posts: n/a
 
      25th Sep 2007
It depends how the names are arranged with in the worksheet but for a column
of names (for example) this would work

Sub caps()
Dim myRange As Range
Set myRange = Range("A1:A1000") ' Change to suit
For Each c In myRange
c.Value = UCase(c.Value)
Next
End Sub

right click the sheet tab, view code and paste it in.

Mike

"MegaGrl" wrote:

> I have a worksheet that contains approximately 2500 names. At this time all
> names in in lowercase. I need to get them all into UPPERCASE. I know
> there's got to be an easier way to do that rather then retyping each name.

 
Reply With Quote
 
JW
Guest
Posts: n/a
 
      25th Sep 2007
Going by your post title, I'm assuming that you want EVERY word in the
worksheet converted to uppercase, correct? If so, you can edit Mike's
code to handle the used range within the worksheet.
Sub caps()
Dim c As Range
For Each c In ActiveSheet.UsedRange
c.Value = UCase(c.Value)
Next
End Sub

MegaGrl wrote:
> I have a worksheet that contains approximately 2500 names. At this time all
> names in in lowercase. I need to get them all into UPPERCASE. I know
> there's got to be an easier way to do that rather then retyping each name.


 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      25th Sep 2007
I'll add my usual caveat about the posted macro.

It will wipe out any formulas in the used range and change them to values.

If any chance of formulas in the usedrange this revision will ignore them.

Sub caps()
Dim c As Range
For Each c In ActiveSheet.UsedRange
If Not c.HasFormula Then
c.Value = UCase(c.Value)
End If
Next
End Sub


Gord Dibben MS Excel MVP

On Tue, 25 Sep 2007 05:31:05 -0700, JW <(E-Mail Removed)> wrote:

>Going by your post title, I'm assuming that you want EVERY word in the
>worksheet converted to uppercase, correct? If so, you can edit Mike's
>code to handle the used range within the worksheet.
>Sub caps()
> Dim c As Range
> For Each c In ActiveSheet.UsedRange
> c.Value = UCase(c.Value)
> Next
>End Sub
>
>MegaGrl wrote:
>> I have a worksheet that contains approximately 2500 names. At this time all
>> names in in lowercase. I need to get them all into UPPERCASE. I know
>> there's got to be an easier way to do that rather then retyping each name.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fix the glitch so words will capitalize after A.(eg) or 12.(eg) =?Utf-8?B?bWU=?= Microsoft Word Document Management 3 6th Dec 2004 03:31 PM
capitalize words Aaron Microsoft Dot NET 10 19th Sep 2004 03:57 PM
capitalize words Aaron Microsoft C# .NET 10 19th Sep 2004 03:57 PM
How to Capitalize words Larry Microsoft Access Queries 2 17th Nov 2003 05:24 PM
How to capitalize all words in a spreadsheet Suresh Microsoft Excel Worksheet Functions 0 22nd Jul 2003 09:15 PM


Features
 

Advertising
 

Newsgroups
 


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