ⓒ 2025 AI교육연구회 withseok. All rights reserved. (위드석)
[블로그 글 내용 상업적 이용금지] 위드석홈 | 위드석개발 | AI교육연구회

엑사남 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
320x100

+ Recent posts