[VBA] 유용한 엑셀 VBA 명령어 10가지 모음


[VBA] 유용한 엑셀 VBA 명령어 10가지 모음

엑셀 VBA를 사용하다보면 유용한 명령들이 많다. 이곳에서 몇가지 유용한 VBA를 소개해 본다. [1] 현재 시트에서 자료가 들어간 마지막 라인을 알고 싶을 때 쓰는 명령어 MsgBox Cells.SpecialCells(xlCellTypeLastCell).Row [2] 현재 시트에서 5번째 컬럼이 "OK" 인 모든 라인들의 색깔을 특정 색깔로 칠하는 방법. 아래의 49407 색깔은 고동색. For i = 1 To Cells.SpecialCells(xlCellTypeLastCell).Row If (Cells(i, 5) = "OK") Then Rows(i).Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .Color = 49407 ' RGB(255, 0, 0) .TintAndShade = 0 .PatternTintAndShade = 0 End With End If Next [3] 선을 특...


#iFreeFile #macro #VBA #매크로 #엑셀 #팁

원문링크 : [VBA] 유용한 엑셀 VBA 명령어 10가지 모음