Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi,
I would like to check and format string from a cell if a condition is met, via using macro button. Condition: if there is apostrophe in that string, the following letter after apostrophe must be lowercase. if the following letter is a space, then nothing happen. Of course, if I select multiple cells, it will check each of them. Thanks in advance. Regards, Magix |
#2
![]() |
|||
|
|||
![]() Dim cell As Range Dim iPos As Long For Each cell In Selection iPos = InStr(cell.Value, ",") If iPos 0 Then cell.Value = Left(cell.Value, iPos) & _ UCase(Mid(cell.Value, iPos + 1, 1)) & _ Right(cell.Value, Len(cell.Value) - iPos - 1) End If Next cell -- HTH RP (remove nothere from the email address if mailing direct) "magix" wrote in message ... Hi, I would like to check and format string from a cell if a condition is met, via using macro button. Condition: if there is apostrophe in that string, the following letter after apostrophe must be lowercase. if the following letter is a space, then nothing happen. Of course, if I select multiple cells, it will check each of them. Thanks in advance. Regards, Magix |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Microsoft Excel in Microsoft works - how to open | Excel Discussion (Misc queries) | |||
excel 4.0 macro removal tool | Excel Discussion (Misc queries) | |||
How do I search for a string across multiple worksheets in Excel? | Excel Worksheet Functions | |||
Excel Database Query String Too Long | Excel Discussion (Misc queries) | |||
Difference in number of Excel NewsGroups | Excel Discussion (Misc queries) |