Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default Convert cells to uppercase

I have been using this for a while. Converts characters in cells to
uppercase. I am trying to expand it to cells A1 to A100.

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Range("A2").Value = UCase(Range("A2").Value)
Range("A11").Value = UCase(Range("A11").Value)
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Convert cells to uppercase


If???? you want to do it by selecting any cell in that range, try this.

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
if target.row100 or target.column<1 then exit sub
target.Value = UCase(target)
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Fan924" wrote in message
...
I have been using this for a while. Converts characters in cells to
uppercase. I am trying to expand it to cells A1 to A100.

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Range("A2").Value = UCase(Range("A2").Value)
Range("A11").Value = UCase(Range("A11").Value)
End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default Convert cells to uppercase

It does not work that well. If I enter a value of "af" and leave the
cell, nothing. When I revisit the cell, then it will change the cell
to "AF". My previous attempt changes to uppercase as I leave the cell.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Convert cells to uppercase

You are talking about a worksheet_change event then. So delete the selection
part

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Fan924" wrote in message
...
It does not work that well. If I enter a value of "af" and leave the
cell, nothing. When I revisit the cell, then it will change the cell
to "AF". My previous attempt changes to uppercase as I leave the cell.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default Convert cells to uppercase

Thanks Don, works great.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Convert cells to uppercase

Glad to help

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Fan924" wrote in message
...
Thanks Don, works great.


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 all text in a sheet to UpperCase? Rich Excel Programming 8 May 31st 07 07:34 PM
How do I change certain cells to Uppercase TazDevil Excel Worksheet Functions 4 August 1st 05 06:35 AM
How can I convert entire columns of text to Uppercase in Excel? dplantlady Excel Worksheet Functions 8 May 1st 05 06:51 PM
How can I convert the contents of a text selection from uppercase. Phil Yandel Excel Programming 1 January 7th 05 09:46 PM


All times are GMT +1. The time now is 06:33 PM.

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"