make uppercase first word in each cell

B

Bob

Hi

I need to select a column in a table (except the first
cell, which is a heading) by clicking in it and then make
the first word of each cell uppercase. I think I can
handle the selection part but have no idea about changing
the case. How do i do that?
 
D

DA

Hi Bob

Here's a simple example that you can expand on to select
and change your text.

---------------
Sub MakeSelUpper()
ActiveDocument.Tables(1).Cell(2, 1).Range.Select

strVal = Selection.Range.Words(1)
Selection.Range.Words(1) = UCase(strVal)
End Sub
 
J

Jezebel

If all your cells start with an actual word you can use

Cell.Range =
ucase(Cell.Range.Words(1)) & mid(Cell.Range, len(Cell.Range.Words(1))+1)

This won't work if the first character in the cell is not a letter -- eg a
parenthesis or quotation mark.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top