Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing capital letters in cells

Status
Not open for further replies.

budgy

Programmer
Jan 4, 2005
73
0
0
GB
Help, quick question,

I need to format a excel document with lots and lots of data entries, i need to change the first letter from a capital to a normal letter is there a quick way of doing this for the whole colum?

Thanks


"He that asks a question is a fool for a moment, he that never asks a question is a fool all his life
 
yes Marc,

thanks, but how do i apply that function to a certain number of rows?..

Ive worked out how to apply it to a single cell, but i need to apply it to cells A2 to A121...

"He that asks a question is a fool for a moment, he that never asks a question is a fool all his life
 
Budgy,

Do you need to apply the function to the data in situ i.e. you want the data in A1 to stay in A1 and not be copied to anywhere else? Also, does each cell have more than one word in it, and if so do all words need capitalizing, or just the first one?

Marc
 
Budgy,

create a macro out of the following code:
Code:
Sub TextProperCase()
Dim rng As Range, cell As Range
Set rng = Intersect(ActiveSheet.UsedRange, Selection)
For Each cell In rng
If cell.HasFormula = False Then
cell.Value = StrConv(cell.Value, vbProperCase)
End If
Next cell
End Sub

Highlight the cells you want capitalized and run the macro.

Hope this helps.

Marc
 
alternatively, put

=lower(A2)

in B2 and copy down
copy B2:B121 and paste special>values back over A2:A121
then delete formulae in B2:B121

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Not the way I read the OP:-

i need to change the first letter from a capital to a normal letter...

Was going to chime in earlier and point that out, but decided against it, but seeing as you have reiterated it :)

Regards
Ken............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Doesn't mean that's what he actually wanted of course, as his reply to you would indicate the contrary, but that is actually what he asked for. :)

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
lol

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top