View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Vincent Jones Vincent Jones is offline
external usenet poster
 
Posts: 1
Default loop through a cell.

I have this:

Function ctTxt(cvTxt As String)
ctTxt = Left(UCase(cvTxt), 1) & "" & Right(cvTxt, Len(cvTxt) - 1)
End Function

Which takes the cell which contains.

hello free world and converts it to Hello free world.

... but how can I make the function loop to say

Hello Free World.

every first letter capitalized.
i'm think combining the Len() and Instr() function to create some type
of loop, but it seems that I'm stuck.