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
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,188
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top