Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I have a column of cells that contains a short bio on a person. For example:
(NAME: CHAD SMITH) HE IS A PERSONAL COMPUTER (PC) USER WHO ENJOYS PLAYING GAMES ON HIS SUPER NINTENDO (SNES). HE ALSO ENJOYS VOLLEYBALL (VBALL) AND BASKETBALL. (WRITTEN BY: JOHN JONES). I would like a macro that puts all the NON parentheses text into sentence case (NOT PROPER CASE), but leave the text within the parentheses unchanged. I found and successfully ran this Macro which puts everything into sentence case: Sub SentenceCase() For Each cell In Selection.Cells s = cell.Value Start = True For i = 1 To Len(s) ch = Mid(s, i, 1) Select Case ch Case "." Start = True Case "?" Start = True Case "a" To "z" If Start Then ch = UCase(ch): Start = False Case "A" To "Z" If Start Then Start = False Else ch = LCase(ch) End Select Mid(s, i, 1) = ch Next cell.Value = s Next End Sub It works great, but I want everything within the parentheses to be ignored. Anyway I can do that? Thanks in advance for all your help! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro ignore formulas | Excel Discussion (Misc queries) | |||
macro - ignore row | Excel Discussion (Misc queries) | |||
Ignore macro run time error | Excel Discussion (Misc queries) | |||
Have macro ignore error | Excel Programming | |||
Easy question: Have macro ignore #N/A | Excel Programming |