'목록하단 광고 치환자(withSeok)

엑사남 8강 Study

엑셀 파일 다운로드

Clear, ClearContents, ClearFormats, Delete, EntireRow, EntireColumn, row(i).xlsm
0.05MB

Sub Clear()

    Range("a2:g21").Clear
        '서식과 값 모두 지워짐

End Sub
Sub Clear_Contents()

    Range("a2:g21").ClearContents
        '서식은 그대로 남음
End Sub
Sub Clear_Formats()

    Range("a2:g21").ClearFormats
        '서식만 삭제
End Sub
Sub 남_삭제()

Dim i As Long
    For i = 21 To 2 Step -1
        If Cells(i, "c") = "남" Then
            Cells(i, "c").EntireRow.Delete
            '또는 Row(i).Delete
        End If
    Next i
    
End Sub
Sub 남과70점이하_삭제()

Dim i As Long
    For i = 21 To 2 Step -1
        If Cells(i, "c") = "남" Or Cells(i, "g") <= 70 Then
            Cells(i, "c").EntireRow.Delete
            '또는 Row(i).Delete
        End If
    Next i
    
End Sub
728x90

+ Recent posts