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

엑사남 7강 Study

구분하여 서식만 붙여넣기

 

Sub 남여서식구분()
초기화둘
Dim i As Long
    For i = 7 To 16
        If Range("e" & i) = Range("e2") Then
            Range("c2:j2").Copy
            Range("c" & i).Resize(1, 8).PasteSpecial xlPasteFormats
            Range("i2:j2").Copy
            Range("i" & i).Resize(1, 2).PasteSpecial xlPasteFormulas
        Else
            If Range("e" & i) = Range("e3") Then
                Range("c3:j3").Copy
                Range("c" & i).Resize(1, 8).PasteSpecial xlPasteFormats
                Range("i3:j3").Copy
                Range("i" & i).Resize(1, 2).PasteSpecial xlPasteFormulas
            Else
            End If
        End If
    Next
Application.CutCopyMode = False
Range("a1").Select
End Sub
엑셀 파일 다운로드

PasteSpecial, xlPasteValues, xlPasteFormulas, xlPasteFormats, copy-두번째.xlsm
0.11MB

320x100

+ Recent posts