|
そこまでを編集し直すと・・
Sub 在庫()
Dim C As Range
Dim i As Integer, v As Integer
Dim Bs As String, St As String
Dim lngEndROW As Long
Dim test As Variant, sizeIndex As Variant
With Worksheets("アクセサリー")
For v = 38 To 5 Step -1
test = .Cells(1, v).Value
If Not IsNumeric(test) Then
If test = "総計" Or "その他" Then
.Columns(v).Delete xlShiftToLeft
End If
Else
If Len(test) = 4 Then
.Cells(1, v).Value = _
Left(test, 2) & "-" & Right(test, 2)
.Cells(1, v).Value = VBA.Trim(.Cells(1, v).Value)
ElseIf Len(test) = 3 Then
.Cells(1, v).NumberFormat = "@"
.Cells(1, v).Value = _
Left(test, 2) & "." & Right(test, 1)
End If
End If
Next v
End With
|
|