View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Change Case for Names

oops

Meant to post this instead.

cell.Formula = Application.Proper(cell.Formula)


Gord

On Sat, 16 Jun 2007 17:21:49 -0700, Gord Dibben <gorddibbATshawDOTca wrote:

I prefer to not change any formulas in the selection to values.

cell.Formula = StrConv(cell, vbProperCase)


Gord Dibben MS Excel MVP

On Sat, 16 Jun 2007 15:56:39 -0400, "Rick Rothstein \(MVP - VB\)"
wrote:

A little more detail:

Sub Conv()
For Each cell In Selection
cell.Value = StrConv(cell, 3)


I always find using the built-in VB constants makes reading a statement
easier...

cell.Value = StrConv(cell, vbProperCase)

Rick


Next cell
End Sub