View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default How to make First letter of the cell in capital letter

Hi Bob,

Please explain disadvantages of calling worksheet functions when also other
means are available.

What is the difference between the two ways of changing the first letter to
capitals?

Thanks,
Stefi


€˛Bob Phillips€¯ ezt Ć*rta:

Partly because I would rather not call out to worksheet functions when
there is no need to, and partly because it doesn't do what the OP asks for.

--
__________________________________
HTH

Bob

"Stefi" wrote in message
...
Why not

cell.Value = WorksheetFunction.Proper(cell.Value)

Stefi


"Bob Phillips" ezt Ć*rta:

Dim cell As Range

For Each cell In ActiveSheet.UsedRange

If cell.Value < "" Then

cell.Value = UCase(Left(cell.Value, 1)) & Right(cell.Value,
Len(cell.Value) - 1)
End If
Next cell


--
__________________________________
HTH

Bob

"Irshad Alam" wrote in message
...
I have a sheet in which there are text matters.

I want to run a code, so that all the cells of the worksheet can be
effected
to change the first letter of the cell into capital.

I was able to know with the web helps examples, by that I can do it
manually
with the cell reference one by one. the formula is as below :

=CONCATENATE(UPPER(LEFT(A1,1)),LOWER(RIGHT(A1,LEN( A1)-1)))

But I want to run in a code for the complete sheet, so once I run the
code
and it can be effective for all the sheet

pls. advice

Irshad