반응형

vba - 셀서식 음수는 빨간색으로 


참고 ; http://www.globaliconnect.com/excel/index.php?option=com_content&view=article&id=121:custom-number-formats-date-a-time-formats-in-excel-a-vba-numberformat-property&catid=79&Itemid=475





.Range("J26").Resize(10, 2).NumberFormat = "[red][<0]-#,##0"








 다른 예 )  천단위 콤마 표시, 음수는 red, 양수는 black,   숫자없으면 0 ?으로 표시 


.Range("C5").Resize(bong_coll.count + 2, 10).NumberFormat = "[red][<0]-#,##0;[black][>=0]#,##0"


반응형

'vba' 카테고리의 다른 글

vba -- nothing 사용  (0) 2017.05.24
vba - collection 참고  (0) 2017.05.20
vba -- autofilter 참고  (0) 2017.05.20
vba -- Consolidate (통합) 사용 ; 중복 data 합산하기  (0) 2017.05.17
Posted by 자유프로그램
,