LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default specify cell selection in a marco

I found a useful macro online but it only selects cells A1:A5 and I need to
modify it so I can select a range of cells by highlighting them, and then run
the macro. I tried to delete part of the syntax but just get error messages.
The macro I have now is:

Sub Uppercase()
' Loop to cycle through each cell in the specified range.
For Each x In Range("A1:A5")
' Change the text in the range to uppercase letters.
x.Value = UCase(x.value)
Next
End Sub

Can anyone fix this for me?
thanx - chu
 
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
Add "left align across selection" cell formatting Monty Analyst Excel Worksheet Functions 2 November 5th 08 03:17 PM
Selection starting from active cell Ronald Dodge Excel Discussion (Misc queries) 3 October 10th 06 12:46 AM
cell selection appears locked. How do I unlock it. Heinz Excel Worksheet Functions 1 August 30th 06 08:24 PM
Line selection from a cell script through a VBA macro CamiIRE Setting up and Configuration of Excel 2 April 11th 06 04:28 PM
Cell Selection after "Enter" Synectica Excel Discussion (Misc queries) 6 August 29th 05 09:55 PM


All times are GMT +1. The time now is 10:08 AM.

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

About Us

"It's about Microsoft Excel"