Capitalize everything in the cell ,even if it has a formula.

daniels012

Well-known Member
Joined
Jan 13, 2005
Messages
5,219
I am trying to capitalize a range of cells E2:M9
I tried uzing the ASAP Utilities, unfortunately it erased all of my formulas.

I need to capitalize cells and keep the formulas.

Any suggestions?

Thank You,
Michael
 

Cbrine

Well-known Member
Joined
Dec 2, 2003
Messages
3,196
Code:
Sub Caps()

Dim cell As Range
On Error Resume Next
For Each cell In Selection
    If Not (Left(cell.Formula, 1) = "=") Then
        cell = UCase(cell)
    End If
Next cell
End Sub
This should do the job for you. Just add the code to a module in the vbe. To use it, just highlight the area to Capatialize, and select the macro from the menus Tools...Macro....run

HTH
Cal
 

RalphA

Well-known Member
Joined
May 14, 2003
Messages
3,829
I must admit that Cbrine's VBA solution has got to be much better than mine! However, here is another, easier but restrited way:

Click on the button just before the A column letter to select all the sheet (or, hit Ctrl+a).
Click on Format, Cells, Font. Under the Font: window, select one of three font types, Engravers MT, Perpetua Titling MT, or Stencil. then OK. Done.
 

daniels012

Well-known Member
Joined
Jan 13, 2005
Messages
5,219
Thank you both for your responses.
I have found that if I add the =UPPER() function to the beginning of the functions I alreaady have, It works fine.

Thank You,
Michael
 

Forum statistics

Threads
1,078,246
Messages
5,339,071
Members
399,276
Latest member
Donjayok

Some videos you may like

This Week's Hot Topics

Top