![]() RLoopCells = StrConv(rLoopCells, vbUpperCase) If lReply = vbYes Then ' Convert to Upper Case LReply = MsgBox("Select 'Yes' for UPPER CASE or 'No' for Proper Case.", _ Set rAcells = rAcells.SpecialCells(xlCellTypeConstants, xlTextValues) On Error Resume Next 'In case of NO text constants. Right-click on your sheet tab, select ViewCode (or press Alt/Option-F11), insert a module by selecting Insert → Module, and enter the following code: Sub ConvertCase( )ĭim rAcells As Range, rLoopCells As Range We can fix this with the use of some simple code that displays a message box asking if we would like toĬonvert to uppercase or proper case. Practical, such as with massive amounts of data. ![]() ![]() ![]() These functions work well when referring to cells that house the text, but there are many instances when using the worksheet function approach is not The existing functions that can be used to change text are: =UPPER(A1)Ĭonverts all text in cell A1 to uppercase (all caps), giving the result ofĬonverts all text in cell A1 to proper case which would give the result When using a built-in Excel function is impractical, you can use a custom macro to change any existing text to uppercase or proper case.Įxcel already has two functions that change text to uppercase (all caps), or proper case (capitalizing the first letter of every word). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |