|
こんにちは。
例えばD、E列を作業列に使ったとして..。
Sub otfiru22()
EDC = Range("C65536").End(xlUp).Row
Range("D2:D" & EDC).FormulaR1C1 = "=ISNUMBER(RC[-1])"
Range("D1:E1").AutoFilter
Range("D1:E" & EDC).AutoFilter Field:=1, Criteria1:=True
Set myrange = Range("C2:C" & EDC).SpecialCells(xlCellTypeVisible)
For Each cel In myrange
If cel.Interior.ColorIndex = xlNone Then
cel.Offset(, 2).Value = "S"
End If
Next
Range("D1:E" & EDC).AutoFilter Field:=2, Criteria1:="S"
Range("E2:E" & EDC).SpecialCells(xlCellTypeVisible).EntireRow.Select
Range("D2:E" & EDC).SpecialCells(xlCellTypeVisible).ClearContents
End Sub
Sub kaijo()
ActiveSheet.AutoFilterMode = False
End Sub
|
|