Re: Macro Help (Uppercase multiple ranges?)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Gord ... (Happy morning) ... Excel2003

1 ... I am clueless when it comes to Code ... I record Macros only & then I
attempt to get creative with cut/paste ... (My highest respect to the Code
Writers.)

2 ... I revised Range from A1:A5 to my Range (G14:CB37)

3 ... I replaced ... x.Value = UCase(x.value) ... with ... x.Formula =
UCase(x.Formula)

4 ... I ran Macro & got Debug error which appeared to occur when the Macro
hit the 1st cell containing a formula.

Above said ... my Range is G14:CB37 with Formulas in Cols U, AJ, AY, BN & CC.

The Macro I found for this in the Knowledge appeared to work fine except it
was clearing my Formula's in the columns indicated.

So ... with this new found knowledge of my shortcomings in the understanding
of Code ... Can you tell me what further edits I need to make? ... Many
Thanks ... Kha





"Gord Dibben" wrote:

Make the alteration like such............

For Each x In Range("A1:A5")
x.Formula = UCase(x.Formula)


Gord Dibben MS Excel MVP

On Mon, 27 Nov 2006 07:47:02 -0800, Ken <Ken@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Excel2003 ... following Code found in the Knowledge Base ... I altered Range
& Code works well ... Except: I have some Cols within my Range that contain
Forumula's which are being erased ...

Above said ... How do I edit this Code to properly work on multiple Ranges
... as I am thinking I need to omit the cells containing Formulas.

Macro to Change All Text in a Range to Uppercase Letters

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

Thanks ... Kha


.



Relevant Pages

  • Re: JTable/TableModel undoing
    ... similar and related edits (e.g. collapsing multiple single character deletions into a "word deleted" edit). ... Either a cell was updated or it wasn't. ... E.g. what should happen if the user has edited some change in a cell, the change has not been applied to the model, but the user invokes undo? ... Here it seems to me that the JTable should have delivered change notifications for the text edits to the undo manager. ...
    (comp.lang.java.programmer)
  • Re: Validation is not working
    ... the change event only fires when someone edits a cell. ... Private Sub Worksheet_Change ... MsgBox "That Entry is NOT ALLOWED!" ...
    (microsoft.public.excel.programming)
  • Macro with relative address problem XSL 2000
    ... Basically I want to create a macro that edits a ... Cell Contents ... On Stop Recording Toolbar depress Relative Address, ... Since the cursor is on a A2, Pressing CTRL+z will make the contents ...
    (microsoft.public.excel)
  • Re: Print Preview Renaming BOM Colum?
    ... after making all the edits you want, ... Properties and uncheck automatic update of BOM ... Default/QTY I would like it to just say QTY. ... I have tried editing the cell, and then saving it, but it still ...
    (comp.cad.solidworks)
  • Re: I cannot fit all of my information in a single cell...`
    ... If you are entering through a form, ... check the edits on each control on your form (as you can further define the ... > characters in that cell. ...
    (microsoft.public.access.gettingstarted)