• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Capitalizing

MalR

Member
Hi guys. I have a template 40 rows long and 12 cols wide and I would like a number of the cells in it to be capitalized so that when I fill it out the text in these cells show as capitals. I understand that this is difficult as Excel has not allowed for it but has anyone worked out a solution? The cells can be in several places in the table so not able to use =UPPER(A2).
I am using Office 365 on Win 10.
Thanks in advance
 
The only way I can think of is through a macro. To use macro below. Select the cells you want to be uppercase and run

Code:
Sub UpperCase()

Dim rng As Range
Dim subrng As Range

Set rng = Selection
For Each subrng In rng
    subrng = UCase(subrng)
Next

End Sub
 
Or since Office 365 comes with PowerQuery on board, you don't care how it is entered. You just clean up and standardize afterwards with a single click.
 
Dear friend,

A small suggestion.

Select the area you want.

Press ALT + F11
Go to command window.

TYPE :

selection.value=evaluate("if(row(),upper(" & selection.address & "))") & ENTER.

The desired data will be capitalized.

PLEASE REMEMBER ONE THING CAREFULLY. IT CAN NOT BE CONVERTED INTO BACK AS IT IS A MACRO COMMAND.

TRY THIS AND SEE THE RESULT.

ALSO SEE MY OLD POST IN THE NAME OF

Convert into UPPER Case with a single command / macro



VDS
 
The only way I can think of is through a macro. To use macro below. Select the cells you want to be uppercase and run

@chirayu's macro could be adjusted to operate over a predefined range rather than a user selection. If the worksheet range were named 'upper' then it would require

Code:
Set Rng = [upper]

or, if you want to trigger the macro with a worksheet change event, you could use the intersection of the ranges 'Target' and Range("upper").
 
Thanks vletm. I thought it was something different. I need something that I can highlight a number of cells in a table in a template and make them capitalize. So when I type some text in these cells they will show as caps. I drag the template along to duplicate therefore the formula or code must repeat
 
MalR
Why You would like to 'clean' those afterwards?
Why You d/won't take care 'capitalizing' as soon as possible? = before enter.
You could use fonts, which are all 'UPPER' eg 'Engraves MT'.
There could be more of those fonts too.
Then still no need to use macros.
 
If you want the uppercase to propagate to new cells with copy then you could define a style 'upper' that either flags the cell for VBA processing
Code:
   If subRng.Style = "Upper" Then subRng = UCase(subRng)
or even, as @vletm suggests, is defined to use an uppercase only font. I found 'Stencil' but perhaps that give an excessive level of emphasis for the content.
 
MalR
Why You would like to 'clean' those afterwards?
Why You d/won't take care 'capitalizing' as soon as possible? = before enter.
You could use fonts, which are all 'UPPER' eg 'Engraves MT'.
There could be more of those fonts too.
Then still no need to use macros.
MalR
Why You would like to 'clean' those afterwards?
Why You d/won't take care 'capitalizing' as soon as possible? = before enter.
You could use fonts, which are all 'UPPER' eg 'Engraves MT'.
There could be more of those fonts too.
Then still no need to use macros.


Great suggestion vletm and Peter! I am always looking at formulas and macros to get stuff done. Never crossed my mind to change the font. Sometimes the simplest solution is the easiest.
Thank you to all who replied. This can be closed now.
 
Back
Top