Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How to i capitalize all words in an existing worksheet?

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How to i capitalize all words in an existing worksheet?

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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 638
Default How to i capitalize all words in an existing worksheet?

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.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How to i capitalize all words in an existing worksheet?

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 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
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 Capitalize all the font on a worksheet? Vicki M Excel Discussion (Misc queries) 3 May 30th 07 06:05 AM
Easiest way to CAPITALIZE entire worksheet ? Nugget Excel Discussion (Misc queries) 3 July 5th 06 07:46 PM
How do I conditionally build worksheet from existing worksheet? Bob G Excel Discussion (Misc queries) 1 July 3rd 05 06:40 PM
Creating a Microsoft Words document from an existing Excel spreads ringo tan New Users to Excel 1 December 30th 04 08:01 PM
Creating new worksheet from existing ddpen Excel Discussion (Misc queries) 2 December 1st 04 10:35 PM


All times are GMT +1. The time now is 02:02 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"