updated worksheet now macro won't work

bobvilla

New Member
Joined
Dec 28, 2010
Messages
13
I've got a macro that copies information from one sheet to another and does some format tweeking to the information in the new sheet. The problem is that I inserted a column in the first worksheet and now part of the macro won't work. I updated the cell information to be correct in the macro, but I'm wondering if there is something else i need to do. Below is the macro I'm running.
The part highlighted in red is the part that quit working. It is code to make all of the text upper case.

Rich (BB code):
Sheets("WILL").Select
Range("D4:J7000").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("TOTAL").Select
Range("C56000").Select
ActiveSheet.Paste
Columns("C:I").Select
Range("H1").Activate
Application.CutCopyMode = False
Selection.Sort Key1:=Range("E2"), Order1:=xlAscending, Key2:=Range("F2") _
, Order2:=xlAscending, Header:=xlYes, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _
:=xlSortNormal
Columns("C:I").EntireColumn.AutoFit
Columns("C:I").Select
Selection.Interior.ColorIndex = xlNone
Range("C2:I56000").Select
Selection.Font.Bold = False
Columns("G:G").Select
Selection.NumberFormat = "$#,##0.00"
Columns("C:I").Select
Dim Rng As Range
On Error Resume Next
Err.Clear
Application.EnableEvents = False
For Each Rng In Selection.SpecialCells(xlCellTypeConstants, _
xlTextValues).Cells
If Err.Number = 0 Then
Rng.Value = StrConv(Rng.Text, vbUpperCase)
' Rng.Value = StrConv(Rng.Text, vbLowerCase)
' Rng.Value = StrConv(Rng.Text, vbProperCase)
End If
Next Rng
Application.EnableEvents = True
Columns("C:I").EntireColumn.AutoFit
Range("A2").Select
End Sub
 
Last edited by a moderator:

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,215,063
Messages
6,122,930
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top