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.
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: