Seems to work. Do you think there is any way to combine that with the other code you helped me with?
I realize I keep asking but it is crazy to me that all of this can be combined. I had ten modules! I think the code you just did above needs to come last in the order. The other code was:
Sub InsertColumns()
Dim ws As Worksheet, LR&, i&, c As Range
Application.ScreenUpdating = 0
For Each ws In ThisWorkbook.Worksheets
With ws
On Error Resume Next
.Cells.Find("Item #").EntireColumn.Offset(0, 1).Insert
.Cells.Find("Item #").EntireColumn.Offset(0, 1).Insert
.Range("C1").Value = "Item #"
.Range("D1").Value = "Class #"
.Range("B:B").Copy .Range("C:C")
LR = .Cells.Find("*", , , , xlByRows, xlPrevious).Row
For i = 2 To LR
.Cells(i, 4) = "'" & Left(.Cells(i, 2), 2)
Next i
For Each c In .Range("C2:C" & LR)
c.Value = c.Value
Next
End With
With ws
Set Rng = .Range("F2", .Range("F" & Rows.Count).End(xlUp))
End With
Rng.TextToColumns Destination:=ws.Range("X2"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=True, Other:=False, OtherChar _
:="-", FieldInfo:=Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 2), _
Array(6, 2), Array(7, 2), Array(8, 2)), TrailingMinusNumbers:=True
Dim s As Worksheet
For Each s In Sheets
'hide required columns
s.Columns("G:W").Hidden = True
Next
Next ws
Application.ScreenUpdating = 1
End Sub
Bookmarks