|
もう一か所、以下も直して下さい
With Sheets("1部屋")
With .Range("A1")
.AutoFilter Field:=9, Criteria1:="1LDK"
.CurrentRegion.Copy Destination:=Sheets("1LDK").Range("A1")
'◆修正行↓
Application.Intersect(.CurrentRegion, .CurrentRegion.Offset(1)).EntireRow.Delete
.AutoFilter
End With
.Cells.Sort _
Key1:=.Range("V1"), Order1:=xlDescending, _
Header:=xlGuess, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, SortMethod:=xlPinYin, _
DataOption1:=xlSortNormal
End With
を
With Sheets("1部屋")
With .Range("A1")
.AutoFilter Field:=9, Criteria1:="1LDK"
.CurrentRegion.Copy Destination:=Sheets("1LDK").Range("A1")
'★修正後↓
Application.Intersect(.CurrentRegion, .CurrentRegion.Offset(1)) _
.SpecialCells(xlCellTypeVisible).EntireRow.Delete
.AutoFilter
End With
.Cells.Sort _
Key1:=.Range("V1"), Order1:=xlDescending, _
Header:=xlGuess, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, SortMethod:=xlPinYin, _
DataOption1:=xlSortNormal
End With
に直して下さい
|
|