ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Capitals (https://www.excelbanter.com/excel-discussion-misc-queries/178189-capitals.html)

rexmann

Capitals
 
Hi All

A bit of an odd one but is there a way to select all cells and make all text
capitals? I know there is a formula but I was hoping to do Ctrl A and then
turn all small case to capitals.

Any help greatly appreciated

Cheers Rexmann

Ps using excel 2003

Jim Thomlinson

Capitals
 
You can do it but you need to use a macro something like this...

public sub MakeAllCaps
dim rng as range

on error resume next
for each rng in intersect(usedrange, selection)
rng.value = ucase(rng.value)
next rng
on error goto 0
end sub
--
HTH...

Jim Thomlinson


"rexmann" wrote:

Hi All

A bit of an odd one but is there a way to select all cells and make all text
capitals? I know there is a formula but I was hoping to do Ctrl A and then
turn all small case to capitals.

Any help greatly appreciated

Cheers Rexmann

Ps using excel 2003


Jim Thomlinson

Capitals
 
Sorry I should have mentioned. That code will convert formulas to values...
If you have formulas that you do not want to overwrite then try this...

public sub MakeAllCaps
dim rng as range

on error resume next
for each rng in intersect(usedrange,
selection.SpecialCells(xlCellTypeConstants))
rng.value = ucase(rng.value)
next rng
on error goto 0
end sub

--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

You can do it but you need to use a macro something like this...

public sub MakeAllCaps
dim rng as range

on error resume next
for each rng in intersect(usedrange, selection)
rng.value = ucase(rng.value)
next rng
on error goto 0
end sub
--
HTH...

Jim Thomlinson


"rexmann" wrote:

Hi All

A bit of an odd one but is there a way to select all cells and make all text
capitals? I know there is a formula but I was hoping to do Ctrl A and then
turn all small case to capitals.

Any help greatly appreciated

Cheers Rexmann

Ps using excel 2003


rexmann

Capitals
 
Nice one thank you

Cheers Rexmann

"Jim Thomlinson" wrote:

You can do it but you need to use a macro something like this...

public sub MakeAllCaps
dim rng as range

on error resume next
for each rng in intersect(usedrange, selection)
rng.value = ucase(rng.value)
next rng
on error goto 0
end sub
--
HTH...

Jim Thomlinson


"rexmann" wrote:

Hi All

A bit of an odd one but is there a way to select all cells and make all text
capitals? I know there is a formula but I was hoping to do Ctrl A and then
turn all small case to capitals.

Any help greatly appreciated

Cheers Rexmann

Ps using excel 2003



All times are GMT +1. The time now is 12:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com