text case

  • Thread starter Thread starter SUNIL PATEL
  • Start date Start date
S

SUNIL PATEL

I know about UCASE and LCASE, but can you format the text "PLEASE HELP" to
"Please Help" or even to "Please help" using code.

Sunil
 
Sub Test()
sText = "PLEASE HELP"
sText2 = Application.Proper(sText) 'Please Help
sText3 = UCase$(Left$(sText, 1)) & LCase$(Mid$(sText, 2)) 'Please help
Debug.Print sText, sText2, sText3
End Sub
 

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

Similar Threads

File Name string formatting problem 2
autofilter 1
insert picture 3
hide excel sheets 3
date format cell, to text format 2
combobox 2
PivotCache.refresh not working 0
Search 14

Back
Top