Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default Convert text to all caps

Is there any way to convert all text, in the range B3:M2500, to all capital
letters from within a macro?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Convert text to all caps

Hi,

Right click your sheet tab, view code and paste this in and run it

Sub standard()
Set myrange = Range("B3:M2500")
For Each c In myrange
c.Formula = UCase(c.Formula)
Next
End Sub

Mike

"Patrick C. Simonds" wrote:

Is there any way to convert all text, in the range B3:M2500, to all capital
letters from within a macro?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Convert text to all caps

Sub tst()
Dim rng As String
Range("b3").Select
Nex:
Do Until ActiveCell.Row = 2501
col = Mid(ActiveCell.Address, 2, 1)
rng = ActiveCell.Value
ActiveCell.Value = UCase(rng)
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell.Offset(-2498, 1).Activate
If col = "N" Then End
GoTo Nex

End Sub


"Patrick C. Simonds" wrote:

Is there any way to convert all text, in the range B3:M2500, to all capital
letters from within a macro?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Convert text to all caps

Hi Patrick

For Each c in
Range("B3:M2500").SpecialCells(xlCellTypeConstants ,xlTextValues)
c.Value = UCase(c.Value)
Next c


Richard


"Patrick C. Simonds" wrote in message
...
Is there any way to convert all text, in the range B3:M2500, to all
capital letters from within a macro?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Convert text to all caps

Hi,

I hope there are no formula in the range, if there are this converts them to
values.

Mike

"dmoney" wrote:

Sub tst()
Dim rng As String
Range("b3").Select
Nex:
Do Until ActiveCell.Row = 2501
col = Mid(ActiveCell.Address, 2, 1)
rng = ActiveCell.Value
ActiveCell.Value = UCase(rng)
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell.Offset(-2498, 1).Activate
If col = "N" Then End
GoTo Nex

End Sub


"Patrick C. Simonds" wrote:

Is there any way to convert all text, in the range B3:M2500, to all capital
letters from within a macro?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert to Caps Ashish Srivastava New Users to Excel 1 October 12th 07 05:52 AM
fix all caps text to first letter caps MBartine Excel Discussion (Misc queries) 1 August 8th 06 03:02 AM
How do convert an entire column of text in Excel to all caps? Carrie Excel Discussion (Misc queries) 10 March 17th 06 11:06 PM
HOW DO I CONVERT NORMAL TEXT INTO ALL CAPS? daveylee Excel Worksheet Functions 2 November 21st 05 11:21 PM
How can I convert all Caps to first letter caps in Excel? Fenljp26 Excel Worksheet Functions 5 June 30th 05 11:35 AM


All times are GMT +1. The time now is 02:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"