Sub 랭킹서식처리()
' Excel 2010
' 랭킹서식처리 매크로
' 조건부서식을 이용한 서식처리 매크로
'
Range("BA5:BA66").Select '서식처리 영역
Selection.FormatConditions.AddTop10 '조건부서식 랭킹 처리 추가
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1)
.TopBottom = xlTop10Top '순위
.Rank = 5 '5순위까지
.Percent = False
End With
With Selection.FormatConditions(1).Font '폰트처리
.Bold = True
.Italic = False
.Color = -16776961 '빨강
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior '배경처리
.PatternColorIndex = xlAutomatic
.Color = 65535 '노랑
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
ActiveWindow.SmallScroll Down:=-12
Selection.FormatConditions.Delete '서식 취소
End Sub
'공사 > EXCEL & VBA' 카테고리의 다른 글
문자열 내 특정 글자 바꾸기 (0) | 2013.07.03 |
---|---|
문자열을 구분자를 이용한 1차원 배열화 (0) | 2013.06.21 |
엑셀 차트 이름바꾸기 (0) | 2013.05.10 |
메모(Comment) 크기 조정하는 법 (0) | 2011.05.12 |
엑셀2003에서 2007 이후 버전 파일 열기 (0) | 2010.11.09 |